Success! With a combination of those articles, plus simply [Serving static content from node][1] and Heroku’s [Getting started with nodejs][2], success.
- Add a dependency to express in
package.json
:
"dependencies": {
"express": "4.8.4",
```
2. Create a web.js file like this:
var express = require(‘express’);
var app = express();
app.use(express.static(__dirname + “/www”));
app.listen(process.env.PORT || 5000);
3. Create a `Procfile` to launch this:
web: node web.js
Now you should be able to launch the server using [Foreman][3] by typing:
foreman start
Push it to github, ensure there's one dynamo running by typing:
heroku ps:scale web=1
and should be good to go. Thanks for the tips!
[1]: http://blog.modulus.io/nodejs-and-express-static-content
[2]: https://devcenter.heroku.com/articles/getting-started-with-nodejs
[3]: http://blog.daviddollar.org/2011/05/06/introducing-foreman.html