#Heroku Express (heroku-node-wildcard), your wildcard node.js server for Heroku
This is a simple node.js server (node.js ver > 0.4.7) powered by express.js 2.4.6, included all the file Heroku needed (heroku guide Sep 2011)
You can use it on your own server with foreman
You can modify this server by editing app.js
Using foreman to start the server locally (or on your own server)
$ foreman start
If you want to change the server file name ( app.js
), or start more service on the server start, please edit Procfile
You can put the static file under /public
by default and using public/index.html
as index page (Sorry that I am too lazy to allow you change the index file name and web directory from variable)
You may render the index from view by uncomment rss.render(...)
and related view setting in app.configure
Heroku using npm
to manage the dependency, and they need to managed in package.json
You need to change the Procfile
according heroku guide Sep 2011
Also you need to scale the worker process.
In the scale process you need to change the parameter if you have more dyno, e.g. heroku ps:scale web=2
- By default you need to scale process once (
heroku ps:scale web=1
), changing file doesn't require to do the scaling again - MIME Type support made by express.js. if you need more, please reference to this gist for a mapping and do it on your own