node package manager

term-paper-warehouse

TERM PAPER WAREHOUSE STATIC SITE

Serves the logged-out state of the TPW site.

Build Status

Run Status

Installation

$ npm i

Development

Runs the tests every time a file is changed.

$ gulp

Run the tests a single time

$ gulp test

Configuration

Configuration variables and flags for the SPLAT frontend application. Some of these can be set via Node environment variables and some are just hard-coded in the server.js file. These are to be set on a per SPLAT frontend instance basis.

Environment Variables

  • EXTERNAL_API_URL The base url used to generate all API urls Ex: http://test.api.com
  • RECURLY_PUB_KEY Recurly Js public key.
  • GA_TRACKING_ID Google Analytics tracking id.
  • OPTIMIZELY_CODE An optimizely tracking id.
  • PAYMENTS_PAYPAL_ENABLED When true paypal payments will be enabled.
  • DISABLE_STRICT_HTTPS Disables always creating an https link to splat document pages on essay pages. (for development only)

Feature Toggles

  • enableRelatedDocumentsComponent Toggles the related documents component.
  • enablePopularTopicsComponent Toggles the popular topics component.

Other Variables

  • splatCssLocation The url location of the patterns css file to be used.
  • documentCountEstimate Approximate number of documents the site has.
  • searchTemplate Search url template string to be used for searching documents on the parent site. %s in the template string will be replaced with the users search term.
  • siteName The display name of the parent site.
  • domainName The domain name of the parent site.