NodeJS stack for resilient web-apps (with forever-clusters-connect-urlrouter-domains-httboom)
«per me è la cipolla» ~Pedro
Writing solid error-proof web applications in nodejs is sometimes hard; we've built this wrapper to simplify our job of running, monitoring and maintaining business-critical applications.
It's not designed to be flexible but, instead, to fit perfectly our tools and developing process.
If you need to use library
b instead of
a feel free to fork this repo.
- Forever to automatically restart the application on crash or code changes
- Cluster to handle worker crashes and take advantage of multi-core systems
- Connect as the HTTP middleware, plus:
- Domains to handle unexpected errors / throws
- HTTBoom to handle user and application errors
npm -S install cipolla
examples/ for a full working example,
You should create an
error.jade template to display User and Application Errors (see
Then, to start your application in production and run it forever, watching for file changes, simply use:
NODE_ENV=production nohup node app.js &
nohup ensures the process will not be killed when you close the shell.
NODE_ENV !== 'production' only a single worker is started and files are not watched for changes (use