Botpress: Watch code and run

Created on 18 Jan 2017  路  12Comments  路  Source: botpress/botpress

Hey!
I'm having a lot of fun while playing with botpress. really cool idea and implementation.

I offer a feature, but there is a chance i can do it and just need to RTFM.

Instead of run bp start each time i change my code, the process will watch my code and restart/update himself.

tnx

Most helpful comment

@bishoymelek It's merged, and will be released by as [email protected] - via https://github.com/botpress/botpress/pull/187#issuecomment-335197268

BTW @slvnperron Issue #60 can be closed now too, because it was fixed by PR #187. I hadn't refreshed this browser tab :D

All 12 comments

hey, glad you like botpress :)! It's a very nice idea. What about implementing it with an optional -w or --watch flag on bp start? We would love it if you could make this pull request, it's something I've been wanting too!

Cool! I'll do it. thinking about add nodemon as a module, and in the start file add it to the function.
What do you say? @slvnperron

@slvnperron @eyalcohen4
isn't it what the npm run watch already does? it uses nodemon.
I actually do use this command while testing/hacking botpress (the server or the cli).

If i understand well, you are talking about botpress development.

I meant when developing the bot instance @rocel

@eyalcohen4 that's how I would do it, yes. Though only add it as a devDependencies and make the command available only in development if that makes sense? thanks

oh ok, sorry then. Indeed a flag on start would be user friendly and nodemon a good idea.

I have used https://www.npmjs.com/package/piping before, with great success in server applications.

Maybe that could work here too? Perhaps its use needs to be integrated with, or replace, the current handling of worker process in botpress.start(): https://github.com/botpress/botpress/blob/master/src/botpress.js#L247

Looking into this now.

Implemented. Now waiting for review on #187, which should fix this.

hi @hugojosefson can you please help me use what you implemented so i can use nodemon with botpress ? is there steps to do or something ? thank you

@bishoymelek Sure, I'll look into it!

@bishoymelek It's merged, and will be released by as [email protected] - via https://github.com/botpress/botpress/pull/187#issuecomment-335197268

BTW @slvnperron Issue #60 can be closed now too, because it was fixed by PR #187. I hadn't refreshed this browser tab :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jcampbell05 picture jcampbell05  路  6Comments

mhjb picture mhjb  路  6Comments

slvnperron picture slvnperron  路  7Comments

JustusNBB picture JustusNBB  路  9Comments

rainmakerho picture rainmakerho  路  4Comments