Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Commit

Permalink
document lightweight dynamic server, link to #585.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolness committed Jun 10, 2015
1 parent f247bc6 commit f582131
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ software works.
`GA_DEBUG` | When set to 'on' will output verbose info to the console about what data is being sent to Google Analytics.
`MAILINGLIST_URL` | is the mailinglist signup form URL generated by BSD. If undefined, mailinglist signup is simulated for development purposes.
`MAILINGLIST_PRIVACY_NAME` | is the `name` attribute of the privacy policy checkbox on the mailinglist signup form generated by BSD.
`PORT` | is the port to serve the experimental lightweight dynamic server on. Defaults to 8008.

### Using Environment Variables in Local Development

Expand All @@ -180,6 +181,27 @@ Then run `source .env` before running `npm start`.
want to create a batch file that uses
[`setx.exe`](http://stackoverflow.com/a/11190331).

## Lightweight Dynamic Server (Experimental)

The site can also be served through a lightweight server which
dynamically generates requested HTML files. This feature is currently
experimental. For more information on the rationale behind it, see
[#585][].

To run the server in development mode, use `npm run app`. The
server-side page rendering code will be dynamically updated as
relevant files are changed.

For production deployment, you will need to:

1. Set `NODE_ENV=production` and other relevant environment variables
and then re-run `npm install`. This will build all static assets
that won't change during production.

2. Run `node app.js`.

The server is also designed to be easily deployable on Heroku.

## References

* [Roadmap][roadmap]
Expand All @@ -203,3 +225,4 @@ want to create a batch file that uses
[changelog]: https://github.com/mozilla/teach.webmaker.org/blob/develop/CHANGELOG.md
[contributing]: https://github.com/mozilla/teach.webmaker.org/blob/develop/CONTRIBUTING.md
[Manual Testing]: https://github.com/mozilla/teach.webmaker.org/blob/develop/CONTRIBUTING.md#manual-testing
[#585]: https://github.com/mozilla/teach.webmaker.org/issues/585

0 comments on commit f582131

Please sign in to comment.