diff --git a/README.md b/README.md index fa1d81c0d..01e1251d4 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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] @@ -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