Skip to content

(discontinued) A simple node.js/express.js server for serving static file in heroku (or any other node.js server with foreman)

Notifications You must be signed in to change notification settings

vincicat/heroku-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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

Edit

You can modify this server by editing app.js

Run

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

Static File

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

More package and dependency

Heroku using npm to manage the dependency, and they need to managed in package.json

More Worker

You need to change the Procfile according heroku guide Sep 2011

Also you need to scale the worker process.

More Scale

In the scale process you need to change the parameter if you have more dyno, e.g. heroku ps:scale web=2

Some Note

  • 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

About

(discontinued) A simple node.js/express.js server for serving static file in heroku (or any other node.js server with foreman)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published