serverless-plugin-simulate icon indicating copy to clipboard operation
serverless-plugin-simulate copied to clipboard

add auto reload gateway feature

Open yoyeung opened this issue 8 years ago • 4 comments

What did you implement:

Closes #11

How did you implement it:

  1. Inject a function call apigatewayRestart to monitor serverless.yml.
  2. If will monitor the file change. When file change it will trigger serve.stop function
  3. serve.stop function will call try to stop sever if success it will execute the next callback
  4. next callback will recall serverless.service.load to reload the server list from yml file
  5. rebuild the db and start api gateway again.

How can we verify it:

For this PR i dont know how to write a unit test for it. For manual testing, you can try to modify the serverless.yml. And console will have msg said it's going to restart.

Todos:

  • [ ] Write tests
  • [x] Write documentation
  • [x] Fix linting errors
  • [x] Provide verification config/commands/resources
  • [ ] Change ready for review message below

Is this ready for review?: NO

yoyeung avatar Apr 22 '17 01:04 yoyeung

@gertjvr @johncmckim Can help to take a look travis. It's fail. so my pull request get blocked.

yoyeung avatar Apr 25 '17 05:04 yoyeung

Thanks for looking at this issue @yoyeung. I haven't had a chance to look at this yet, but this is a really important feature and I'd like to look at it soon.

On the surface it looks good. But I'm at Serverlessconf and I'll be unable to look anything in detail until after May 8.

The PR is failing because of a linting issue. If you run npm run lint locally it should show you what the issues are.

johncmckim avatar Apr 25 '17 05:04 johncmckim

@johncmckim Thanks for your comment. I will check it later today. Enjoy the conf. = ]

yoyeung avatar Apr 25 '17 06:04 yoyeung

looks like this feature never made it in. any reason why? still have to manually reload server.

Gerst20051 avatar Mar 21 '18 16:03 Gerst20051