Questions tagged [nodemon]

nodemon is an automated process that monitors the directory for a given node application. When files change in this directory, nodemon automatically restarts the node application.

nodemon is an automated process that monitors the directory for a given node application. When files change in this directory, nodemon automatically restarts the node application.

Basic usage

nodemon [your node app]
nodemon ./server.js localhost 8080
1355 questions
7
votes
3 answers

UnhandledPromiseRejectionWarning Error: Slash in host identifier

I am trying to run nodemon index.js in my terminal but I am getting the following error which I have absolutely no idea what it means as for me is very unclear. Can please anyone explain to me how to solve this? index.js const express =…
Markus Hayner
  • 2,869
  • 2
  • 28
  • 60
7
votes
8 answers

nodemon - app crashed - waiting for file changes before starting

I just started learning Node.js. The idea of this small application is to use express and mongosse to store some users in a based cloud database (mongoDB via mlab). I have two seperate files : User.js (models/User.js) var mongoose =…
MDIT
  • 1,508
  • 5
  • 25
  • 38
7
votes
6 answers

Nodemon internal watch failed error?

I don't know what happened but suddenly my Nodemon starting to show the error. nikhil@nikhil-Lenovo-Z50-70:~/Desktop/dominos$ nodemon server.js [nodemon] 1.12.1 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting…
Nikhil
  • 374
  • 1
  • 4
  • 21
7
votes
1 answer

Express and BrowserSync without gulp?

I'm working on an express app. I used browserSync only to watch static files but now, I want to do the same with an express app. I saw a lot of examples using Gulp. But i wonder if there is any solution to manage only with npm scripts? (and…
Damien Romito
  • 9,801
  • 13
  • 66
  • 84
7
votes
1 answer

nodemon Cannot find module '/path/to/project/home/index.js'

I'm using nodmeon version 1.9.1 on a Linux machine. I'm running nodemon with: nodemon --watch ./build where I have my index.js content in the build folder. But when I run nodemon it keeps looking for index.js file at the project's home folder…
ArchNoob
  • 3,946
  • 5
  • 32
  • 59
7
votes
3 answers

How to use nodemon in NTVS(Node Tools for Visual Studio)

I was working with Node on Visual Studio Professional 13, and I soon realized that restarting my server for every change in code was becoming a hassle. So I did some research and discovered that most people used the nodemon to automatically…
AmitS
  • 170
  • 1
  • 12
6
votes
1 answer

how to setup dotenv in development and production?

In my Express JS API server, I tried to use dotenv with a .env file for my environment setup. I prefer to use the .env file for both development and production environment. I am using nodemon for my development, currently if I include -r…
Eric Cheng
  • 477
  • 1
  • 9
  • 24
6
votes
2 answers

Graceful shutdown with nodemon and express

I am struggling to intercept the signal when nodemon is restarting my express server. I need this in order to close the database which otherwise throws an error when I try to use it next. EDIT: it didn't look like it at first but it does call some…
Taxel
  • 3,859
  • 1
  • 18
  • 40
6
votes
5 answers

Track yaml file changes in nodemon

Nodemon does not reload after yaml files change. How can I configure nodemon to reload the server when a yaml file changes?
Rumesh Madhusanka
  • 1,105
  • 3
  • 12
  • 26
6
votes
1 answer

How to get VSCode to attach to nodemon started by NPM?

Can I have VSCode kick off my app using NPM run scripts and then attach to the resulting process to debug? My project kicks off with nodemon via NPM script (to execute babel, etc). However, while the app kicks off, VSCode's debugger doesn't attach…
Mike Vittiglio
  • 338
  • 1
  • 3
  • 13
6
votes
2 answers

how to run nodemon in windows from package.json

I'm following a VUE tutorial on a mac (shown in youtube). In my src/app.js I have only console.log('hi'); The start command for the Mac in package.json as shown on the youtube video is: "scripts": { "start":…
pashute
  • 3,965
  • 3
  • 38
  • 65
6
votes
3 answers

How to send password in encrypted form from ReactJS to ExpressJS?

const form = { firstname: "", lastname: "", email: "", password: "", gender: "", dob: "", username: "" }; export default class Login extends React.Component { constructor…
Naveen
  • 295
  • 1
  • 3
  • 12
6
votes
1 answer

Nodemon run specific command when specific file changes

nodemon -w abc -x echo 'just watch abc folder' && nodemon -i abc -x echo 'watch all folder except abc folder' If you looks script above, I'm trying to watch my abc folder, and when something changes inside them it will run echo 'just watch abc…
Rohman HM
  • 2,539
  • 3
  • 25
  • 40
6
votes
4 answers

npm packages not available when installed locally

I am working with npm on a web app and I found an issue when using some packages that requires terminal commands to run such like nodemon and concurrently I installed it via sudo npm install --save-dev nodemon and when I try to use it…
Peter Wilson
  • 4,150
  • 3
  • 35
  • 62
6
votes
3 answers

How can I tell nodemon to ignore all node_modules except for one directory

I have a Node.js server I am developing and I'm using nodemon to have the server restarted when the source code changes. This server has a dependency on another module, which I am also developing, so it would be nice if changes to that module also…
Shawn
  • 10,931
  • 18
  • 81
  • 126