<<<<<<< HEAD
The Netflix of charity
Check your globally installed Node version:
node -vIf the version displayed is less than 8.5.0, then run this:
$ nodenv install 8.5.0 && nodenv rehashInstall the packages:
$ yarn installTo test the installation and initialize generated assets, run:
$ yarn run buildWatch for errors displayed in red.
Transpile the source code, enable hot-reloading (and file watching), and start the Babel dev server:
# .env
NODE_ENV="development"# Always ensure your node_modules folder is clean
$ yarn cache clean && rm -rf node_modules# Installs all dependencies and devDependencies. This is needed for building the app.
$ yarn install$ yarn run devBuild the app and start the app server (does not update whilst running when source-code changes):
# .env
NODE_ENV="production"# Always ensure your node_modules folder is clean
$ yarn cache clean && rm -rf node_modules# Installs all dependencies and devDependencies. This is needed for building the app.
$ yarn install$ yarn run build && yarn run start| Name | Description |
|---|---|
| API_BASE_PATH | The Base Path to CHIMP APIs. |
| APP_HOSTNAME | The app's hostname. Used only when USE_NGINX is TRUE. |
| APP_PROXY_URL | URL used to for NGINX configuration. |
| APP_URL_ORIGIN | The URL origin of this application. |
| ASSETS_URL_ORIGIN | The URL origin of the Assets Host. |
| BLOG_PROXY_URL | NGINX configuration variable. Sets CHIMP's blog URL. |
| CHIMP_API_URL_ORIGIN | The URL origin of CHIMP API. |
| DEFAULT_LOCALE | The default locale of the application. |
| GIVING-IN-CANADA_PROXY_URL | NGINX configuration variable. Sets CHIMP's markeing URL. |
| HEROKU_API_TOKEN | The API token needed to configure Heroku Review Apps. |
| LOG_LEVEL | The minimum log level to record. Does not apply to client side logger. |
| NEW_RELIC_APPLICATION_ID | New Relic's ID for the specific application. See New Relic Browser |
| NEW_RELIC_PUBLIC_LICENSE_KEY | The public key provided by New Relic Browser. See New Relic Browser |
| NEW_RELIC_LICENSE_KEY | The secret New Relic license key. This key is inserted automatically by the add on so do not rename this config variable. |
| NODE_ENV | Always "production" for Heroku environments. |
| NODE_MODULES_CACHE | Heroku configuration variable. "TRUE" to cache packages between builds. See Cache behaviour. |
| NPM_CONFIG_PRODUCTION | Possibly still being used by Electrode when building assets. False to install |
| devDependencies required to build the app. | |
| RAILS_APP_PROXY_URL | URL used to for NGINX configuration. |
| RAILS_APP_URL_ORIGIN | The URL origin of the Legacy Rails Application. |
| STATIC_ASSETS_URL_ORIGIN | The URL origin of the Static Asset Host. |
| STATIC_FILES_OFF | "TRUE" to test your app server locally in production mode. |
| STRATEGIES_PROXY_URL | NGINX configuration variable. Sets CHIMP's CIS URL. |
| STRIPE_KEY | The public key needed to communicate with Stripe. |
| STRIPE_URL | The URL to Stripe's javascript snippet. |
| USE_NGINX | "TRUE" if app uses NGINX to proxy requests. SET to "FALSE", for local development. |
| YARN_PRODUCTION | Heroku configuration variable. Analogous to NPM_CONFIG_PRODUCTION. "TRUE" to only install packages listed in dependencies of package.json. "FALSE" to install dependencies and devDependencies |
Using Heroku Review Apps
To spin up a Review App for a PR:
- Submit a pull-request against the
developbranch. - Click
Create Review Appin the Heroku pipeline under the corresponding PR / Review App.
Review Apps are configured via app.json. Environment variables that should be inherited from gemini-dev-client have "required": true set, and can be overwritten by the review app by specifying "value": "some-value". A post-deploy script runs via Heroku CLI (credentials are kept in .netrc) which configures the app to use the Review App Heroku url (APP_URL_ORIGIN, ASSETS_URL_ORIGIN, APP_HOSTNAME).
Gemini uses the Electrode framework to boilerplate much of the behind-the-scenes infrastructure.
Note! Make sure you have already built the app using
npm run dev
| Name | Description |
|---|---|
archetype/ |
Contains Electrode build and runtime configuration for the app |
archetype/config/karma/ |
Configure Karma (test runner) |
archetype/config/webpack/ |
Configure Electrode's webpack |
config/ |
Contains Confippet configurations (used by Express, Redux, and WebPack) |
config/initializers/ |
|
config/partials/ |
Confippet partials (these get injected into the Redux Store during initialisation) |
config/default.js |
Default Confippet configuration (this is the only one that gets used / works) |
config/default.json |
Don't use |
config/production.js |
Don't use |
config/production.json |
Don't use |
config/testState.js |
Confippet configuration used for tests |
demos/ |
Delete me |
dist/¹ |
Contains code compiled by WebPack for distribution (used in "production" mode) |
lib/¹ |
Contains code transpiledcompiled by Babel for hot-reloading (used in "development" mode) |
nightwatch/ |
Contains integration tests |
node_modules/¹ |
Contains all your npm dependencies |
src/ |
Contains Gemini's source-code (see CONTRIBUTING.md) |
.editorConfig |
IDE configuration (ex use spaces instead of tabs) |
.env |
Sets environment variables for running Gemini locally (ignored when deployed) |
.isomorphic-loader-config.json¹ |
File generated by Electrode from WebPack output |
.node-version |
Used by nodenv to determine the version of NodeJS to be used for this project (instead of using package.json's node config) |
gulpfile.js |
Purpose |
nightwatch.conf.js |
Purpose |
nightwatch.js |
Purpose |
package.json |
Gemini package's npm configuration (can also contain configurations used by many npm packages, such as Babel) |
Procfile |
Heroku dyno configuration |
¹ ignored by Git
© 2017 Chimp Technology Inc. All rights reserved.
=======
d230f15c6ac26cf01e8bf25e77ce0a65451a9758