2

Trying to make development with Apostrophe smoother. Running nodemon with app.js and although nodemon detects changes it does not restart the server and i get [nodemon] changes after filters (before/after): 1/0 from Nodemon. I understand that Apostrophe does some asset auto generation. What's the best way to setup Nodemon to watch for changes?

Kiril Okun
  • 41
  • 4
  • Please describe the steps you took to set up nodemon, and clarify what files you are modifying when nodemon fails to pick it up. Thanks! – Tom Boutell Aug 28 '17 at 22:14

2 Answers2

1

Turned out that nodemon does not watch .html files by default. Here's a nodemon.json file that works for me:

{ "restartable": "rs", "verbose": true, "env": { "NODE_ENV": "development" }, "ignore": [ ".git", "node_modules/*" ], "watch": [ "lib" ], "ext": "js html json" }

Kiril Okun
  • 41
  • 4
1

A bit late but we added support for nodemon in Apostrophe 2. Check it out:

Adds nodemonConfig and Prevent restarting of nodemon in some edge cases.

As you can see, this is part of the boilerplate. Each apos create-project using apostrophe-cli will add that config to your package.json. But you could easily add this to your existing projects, of course.

Let us know about any unexpected behavior.

Carsten
  • 152
  • 1
  • 12