serverless-serve
serverless-serve copied to clipboard
starting with Nodemon?
How do I combine the sls serve start
command with Nodemon?
I don't use nodemon, but I achieve a similar result by using entr with find ./api/lib -type f -name '*.js' | entr -rc sls serve start
to watch js files in my api component's lib folder for example.
nodemon --exec "serverless serve start"
I'm using this in package.json during dev:
"scripts": {
"start": "nodemon --exec \"serverless serve start\""
}
This allows me to just run npm start
. Whenever any file in the project changes nodemon will restart serve.
This i great, but sadly isn't working with --inspect :(, but thank you.