Looks like when I do fs.writeFile(), the changed file restarts nodemon. How to make it not restart?

jack blank

I thinks what is happening is that for a callback to update a collection in mongoose I do a writeFile to all.json and I think that is causing my nodemon to restart.

The cmd window:

file saved
[nodemon] restarting due to changes...
{ ok: 1, nModified: 0, n: 1 }
Anon user added to doc
{ ok: 1, nModified: 1, n: 1 }
[nodemon] starting `node server.js`
listenting on port: 3000

I don't want it to restart when all.json changes.

I get a new session when it restarts and I want to do stuff with that session while developing. I don't want to use mongo-store or session store right now. I just don't want node to restart or get a new session but I want to fix it without playing around with the session parameters.

So please confirm that because the all.json file changes that is why nodemon restarts . I know that it doesn't restart for jade or ejs files but I didn't know about json

Also please suggest a solution.

Traveling Tech Guy

Add the name/s of the file/s you're creating to a file called nodemon.json, and place it at the root of your working folder:

{
  "ignore": ["*.test.txt", "myfiles/*"]
}

See other options here.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to make a "<input type="file" />" looks like a link with CSS?

From Dev

How to make UITableView looks like this

From Dev

How do I make a like (fb) button when I click on a specific button of

From Dev

Page numbering restarts when I changed the orientation of the page - Microsoft Office

From Dev

How can i make a custom Holo EditText that looks like this one

From Dev

How can I make text that looks like a link run a controller function when clicked?

From Dev

How do I make a class whose constructor looks like the constructor of a built-in class?

From Dev

How do I check when an input is changed?

From Dev

How do I handle dyno restarts when using Django?

From Dev

How to make TextView looks exactly like EditText?

From Dev

Automatic restart of jar when property file is changed

From Dev

How do I make this list not break lines when browser size is changed?

From Dev

How can I remove a file that looks like a flag?

From Dev

How can I remove a file that looks like a flag?

From Dev

what can i do to optimize this function, and make it looks like more pythonic?

From Dev

I have an input file that looks like this

From Dev

How does a file read looks like in gdb

From Dev

How to make a VBA commandbutton looks like was clicked?

From Dev

How can I make text that looks like a link run a controller function when clicked?

From Dev

How do I make listbox / listview like this

From Dev

How do I make bash do vim-like tab completion for file names?

From Dev

How do i make something scroll like this?

From Dev

How do I make this list not break lines when browser size is changed?

From Dev

How do I remove a file in Linux whose name looks like it's ONLY a hyphen, as in "-"

From Dev

Mule Batch - How to stop auto restart when server restarts?

From Dev

ls -a lists files with "->" arrow I think they are linked how can I make my new file to change when referenced file is changed?

From Dev

How do I tell python what my data structure (that is in binary) looks like so I can plot it?

From Dev

How do I know what correct HTML code looks like

From Dev

How do I create a circular progress bar that looks like a timer?

Related Related

  1. 1

    How to make a "<input type="file" />" looks like a link with CSS?

  2. 2

    How to make UITableView looks like this

  3. 3

    How do I make a like (fb) button when I click on a specific button of

  4. 4

    Page numbering restarts when I changed the orientation of the page - Microsoft Office

  5. 5

    How can i make a custom Holo EditText that looks like this one

  6. 6

    How can I make text that looks like a link run a controller function when clicked?

  7. 7

    How do I make a class whose constructor looks like the constructor of a built-in class?

  8. 8

    How do I check when an input is changed?

  9. 9

    How do I handle dyno restarts when using Django?

  10. 10

    How to make TextView looks exactly like EditText?

  11. 11

    Automatic restart of jar when property file is changed

  12. 12

    How do I make this list not break lines when browser size is changed?

  13. 13

    How can I remove a file that looks like a flag?

  14. 14

    How can I remove a file that looks like a flag?

  15. 15

    what can i do to optimize this function, and make it looks like more pythonic?

  16. 16

    I have an input file that looks like this

  17. 17

    How does a file read looks like in gdb

  18. 18

    How to make a VBA commandbutton looks like was clicked?

  19. 19

    How can I make text that looks like a link run a controller function when clicked?

  20. 20

    How do I make listbox / listview like this

  21. 21

    How do I make bash do vim-like tab completion for file names?

  22. 22

    How do i make something scroll like this?

  23. 23

    How do I make this list not break lines when browser size is changed?

  24. 24

    How do I remove a file in Linux whose name looks like it's ONLY a hyphen, as in "-"

  25. 25

    Mule Batch - How to stop auto restart when server restarts?

  26. 26

    ls -a lists files with "->" arrow I think they are linked how can I make my new file to change when referenced file is changed?

  27. 27

    How do I tell python what my data structure (that is in binary) looks like so I can plot it?

  28. 28

    How do I know what correct HTML code looks like

  29. 29

    How do I create a circular progress bar that looks like a timer?

HotTag

Archive