Search code examples
node.jsforeverkoa

Does Koa need Forever?


Koa has implemented not having a web server shut down when one page has an error. My question.... is this error handling behaviour robust enough that one no longer needs to use Forever when hosting a node site?


Solution

  • You should still use forever (or nodemon, a bit easier to use in some cases) to keep your server running. There are other things that can cause it to crash in a production environment, not just bad requests.

    In development, I've seen insane uptime on some koa apps without using forever/nodemon, but I would not do this in production. It's asking for a 3 am phone call :)

    If you're using Linux/Unix, you should also consider using tmux to keep it running in a separate terminal session, or it can timeout with your terminal session. (Type tmux new -s koa to get started). Here's an article on using tmux with upstart: https://bowerstudios.com/node/953