Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukeocodes/express-nodemon-ngrok-starter
Express Nodemon and Ngrok - The Ultimate `npm run dev`
https://github.com/lukeocodes/express-nodemon-ngrok-starter
express expressjs hello-world ngrok node nodejs nodemon starter starter-kit starter-template
Last synced: 3 months ago
JSON representation
Express Nodemon and Ngrok - The Ultimate `npm run dev`
- Host: GitHub
- URL: https://github.com/lukeocodes/express-nodemon-ngrok-starter
- Owner: lukeocodes
- License: agpl-3.0
- Created: 2020-04-24T07:34:54.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T14:03:12.000Z (about 2 years ago)
- Last Synced: 2024-05-01T15:09:01.364Z (10 months ago)
- Topics: express, expressjs, hello-world, ngrok, node, nodejs, nodemon, starter, starter-kit, starter-template
- Language: JavaScript
- Homepage: https://dev.to/lukeocodes/enny-stack-the-express-ngrok-and-nodemon-stack-23j
- Size: 254 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# The Ultimate `npm run dev`
This is a starter app for [Express.js](https://expressjs.com/).
The `src/devApp.js` runs your `src/app.js` using [Nodemon](https://nodemon.io/) as a module, starting [Ngrok](https://ngrok.com/) 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](https://expressjs.com/en/starter/hello-world.html). You probably just need to start as you normally would, editing `src/app.js` as you build your app.
Clone this repository.
```shell
git clone https://github.com/lukeocodes/express-nodemon-ngrok-starter.git
```Install the dependencies.
```shell
npm install
```## Production Mode
[Nodemon](https://nodemon.io/), [Ngrok](https://ngrok.com/) and [Dotenv](https://www.npmjs.com/package/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.
```shell
npm start
```## Development Mode
Start development mode with the [Nodemon](https://nodemon.io/), [Ngrok](https://ngrok.com/), and [Dotenv](https://www.npmjs.com/package/dotenv) modules.
```shell
npm run dev
```## What Else?
You could use [Livereload](https://www.npmjs.com/package/livereload) to refresh your browser window automatically, if you're working on something which has views.
You could use the [Nodemon](https://nodemon.io/) lifecycle events to update API integrations with your [Ngrok](https://ngrok.com/) address whenever your app comes online in development mode.
## License
Please see [the license](LICENSE).
## Contributing
Please see [the contributing guidance](CONTRIBUTING.md).
## Code of Conduct
Please see [the code of conduct](CODE_OF_CONDUCT.md).