Can we use nodemon with geddy? #557

Closed
mewben opened this Issue Feb 27, 2014 · 4 comments

Comments

Projects
None yet
2 participants

mewben commented Feb 27, 2014

Hello, I find it hard to Ctrl+C, up arrow, then enter whenever I make changes to my code. Can we use nodemon to automate this process of restarting the app whenever a file is changed?

Thank you....

Contributor

molda commented Feb 27, 2014

You need to have geddy installed locally
more info https://github.com/geddy/geddy/wiki/Using-Geddy-without-the-CLI

then create file server.js in your app directory

var geddy = require('geddy');

geddy.start({
  port: '4000',
  environment: 'development'
  //environment: process.env.NODE_ENV || 'development'
});

then run it

nodemon server.js 

I use this to run it with forever

mewben commented Feb 27, 2014

Hi @molda Thanks for your answer...

I tried it but there is some strange behavior happening..

When I run nodemon server.js, it keeps restarting due to changes.. This goes forever..

[nodemon] starting 'node server.js'
[nodemon] restarting due to changes...
[nodemon] starting 'node server.js'
[nodemon] restarting due to changes...
[nodemon] starting 'node server.js'
[nodemon] restarting due to changes...

Please help...

Contributor

molda commented Feb 27, 2014

I think you need to exclude ./log directory, you can create nodemon.json

{
  "ignore": ['log/*']
}

Check nodemon's docs for syntax

If that doesn't help then try to find what files are changed by geddy when you run it.
I think it's only the log directory, though.

mewben commented Feb 28, 2014

Thanks @molda ... it finally works using this config in nodemon.json:

{
    "ignore": ["log/*", "public/js/core/*"]
}

mewben closed this Feb 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment