17 July 2014

I recently needed to create a demo of an OAuth2 workflow. This required four servers in total, most with ssl, all running concurrently. The trick was to actually develop this system within my workflow.

By bringing together the various plugins and writing a configurable base express app, I was able to make a scaffold capable of supporting multiple servers, creating ssl certificates on the fly, and loading middleware, routers, and routes dynamically.

  1. Copy the /app template and paste it to a sibling folder
  2. Change the config.json entry to match your new folder
  3. Make any changes needed to the config
  4. npm install
  5. grunt

If you need to run more than one server at a time, follow the first 2 steps of the previous list, then copy the basic config and change the app name and port of the new config, then run grunt.

If you have ideas for improving this scaffold or find it useful, please let me know.



Discussion:

blog comments powered by Disqus