/express-nodemon-ngrok-starter

Express Nodemon and Ngrok - The Ultimate `npm run dev`

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

The Ultimate npm run dev

This is a starter app for Express.js.

The src/devApp.js runs your src/app.js using Nodemon as a module, starting Ngrok when the app is run, gracefully stopping Ngrok when the app is closed.

How Can I Use This?

src/app.js is just a standard hello-world/app.js from the Express.js site. You probably just need to start as you normally would, editing src/app.js as you build your app.

Clone this repository.

git clone https://github.com/lukeocodes/express-nodemon-ngrok-starter.git

Install the dependencies.

npm install

Production Mode

Nodemon, Ngrok and Dotenv are all devDependencies and only required inside src/devApp.js, so in production mode none of these libraries which are great for development are installed or required by the app.

Start the app without these modules.

npm start

Development Mode

Start development mode with the Nodemon, Ngrok, and Dotenv modules.

npm run dev

What Else?

You could use Livereload to refresh your browser window automatically, if you're working on something which has views.

You could use the Nodemon lifecycle events to update API integrations with your Ngrok address whenever your app comes online in development mode.

License

Please see the license.

Contributing

Please see the contributing guidance.

Code of Conduct

Please see the code of conduct.