pm2 all the things on ur dev box

Apparently you can use pm2 to run anything. I think this makes setting up your dev environment with databases etc pretty easy. Here’s an example of using pm2 to run a development elasticsearch server.

npm install -g pm2

Download and extract elasticsearch somewhere, cd into its bin directory and fire up a dev server with:

pm2 start elasticsearch --interpreter sh

We set the interpreter to sh because elasticsearch in the bin directory is a shell script.

Why using pm2 for dev rocks

  1. It’s easy to watch your logs for errors
  2. It’s easy to remember how to stop and start your dev stuff, especially if you use an ecosystem.json
  3. Takes up less disk space than containers
  4. Don’t have to map ports to various containers

So if you, like me, have the flexibility to do whatever you want on your dev machine, why not take the easy road?

Now you can get back to work pushing giant puzzle pieces into walls
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.