Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serverless-offline for dev api server #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ You should now be able to call a service locally to your local database:

You can follow the path from the service definition to the implementation through `serverless.yml`, `handle.js` and `lib/status.js`.

### Use a local development API server

After running

./node_modules/serverless/bin/serverless offline

a development server should make the endpoints available on http://localhost:3000

## Deployment into Production

In production, the code run on AWS, so you first need to configure your environment for it.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"serverless-secrets-plugin": "0.0.1"
},
"devDependencies": {
"serverless": "^1.10.0"
"serverless": "=1.10.0",
"serverless-offline": "^3.15.3"
}
}
3 changes: 3 additions & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ functions:
method: POST
cors: true
- schedule: rate(1 hour)

plugins:
- serverless-offline