typicode / hotel

🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
MIT License
9.98k stars 426 forks source link

How to pass env variables to hotel? #324

Closed jarvisaoieong closed 5 years ago

jarvisaoieong commented 5 years ago

I've used nvm to run node projects in different version.

So i set the npm scripts as below for convenience

"scripts": {
    "start": "$NVM_DIR/nvm-exec node-dev index.js | bunyan -L"
  },

I can't set this to absolute path because the project is developed by different people.

When i use hotel add 'npm start' to startup the project, it fails as below

image

j-f1 commented 5 years ago

Try including -e NVM_DIR in your hotel add command.

jarvisaoieong commented 5 years ago

It works!

Oh..I've miss this option. THX so much.