Work In Progress
- Serverless Framework
$ npm install -g serverless
- AWS developer account
$ make setup
$ make lambda
After finising upload your app, post to your endpoint.
ex)
$ curl -X POST <YOUR ENDPOINT>:3000/loads -H 'Content-Type:application/json' -d '{"user_id": "bookun", "weight":71.8, "distance":5.2, "date": "2018-09-24 07:00:00", "start_at": "2018-09-23 00:00:00", "end_at":"2018-09-30 00:00:00"}'
- Install
$ npm install -g aws-sam-local
- Run in local
$ make setup
$ make local
- Access to your local endpoint
$ curl -X POST http://localhost:3000/loads -H 'Content-Type:application/json' -d '{"user_id": "bookun", "weight":71.8, "distance":5.2, "date": "2018-09-24 07:00:00", "start_at": "2018-09-23 00:00:00", "end_at":"2018-09-30 00:00:00"}'