Ask coding questions

← Back to all posts
How to make nodemon work
h
FreddyKrueger1

Hello!,

My issue is regarding nodemon.
I was able to launch my app through the shell with "npx nodemon index.js" but it stops running as soon as i close the browser tab (eventho it is boosted and always ON).

There must be a way to make it run on the console forever?

Thank you!

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
FreddyKrueger1
Comments
hotnewtop
Coder100

Use the .replit file to configure the run button instead of running it in the shell. The shell is used for quick 'snippets' not permanent things.

https://docs.replit.com/programming-ide/configuring-run-button

FreddyKrueger1

@Coder100, that seems like what ive been looking for!
Thank you :)

Coder100
OldWizard209

Firstly, you don't have to include npx when running a server using nodemon. You just do nodemon index.js.

Secondly, you don't really need nodemon, because replit automatically updates the server. Just make sure to click the run button.

CodeMaster007

Are “firstly” and “secondly” grammatically correct? Just wondering because I never heard those transitions used like that before. @OldWizard209

OldWizard209

they are gramatically correct, i have used them before, seen people use them. I could explain why they are right, but this is a coding platform, imma stick to the genre for now. ;) @CodeMaster007

FreddyKrueger1

@OldWizard209 well when i do that i get ~/YellowNormalServicepack$ nodemon index.js
bash: nodemon: command not found

I write this thread because i HIT run but when my refreshtoken expires and changes my app hangs and dont take into effects my new info until i manually hit stop and run again.

OldWizard209

first instal nodemon @FreddyKrueger1