https://github.com/luandro/claudia-api-boilerplate
A boilerplate for developing an API with Express, Babel and nodemon; translating into claudia-api-builder; and finally for deploying with Claudia
https://github.com/luandro/claudia-api-boilerplate
Last synced: about 1 month ago
JSON representation
A boilerplate for developing an API with Express, Babel and nodemon; translating into claudia-api-builder; and finally for deploying with Claudia
- Host: GitHub
- URL: https://github.com/luandro/claudia-api-boilerplate
- Owner: luandro
- Created: 2016-05-08T02:42:59.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-08T02:44:04.000Z (about 10 years ago)
- Last Synced: 2025-03-01T05:18:40.223Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://9wtpqwogcb.execute-api.us-east-1.amazonaws.com/latest
- Size: 1.95 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# claudia-api-boilerplate
Meant to be hosted on [AWS Lambda](https://aws.amazon.com/documentation/lambda/) using [claudia-api-builder](https://github.com/claudiajs/claudia-api-builder).
## Usage
Make sure you have [NodeJS](https://nodejs.org/en/) and [nodemon](http://nodemon.org) installed with `npm i -g nodemon`. If you're going to deploy the service, make sure you have [Claudia](https://github.com/claudiajs/claudia) installed with `npm i -g claudia`, and [aws-sdk](https://github.com/aws/aws-sdk-js) installed with `npm i -g npm install aws-sdk`and configured.
1. `git clone https://github.com/luandro/claudia-api-boilerplate.git` to clone the repo
1. `cd claudia-api-boilerplate`
1. `npm i` to install dependencies
1. `npm start ` to start a development Express server with nodemon and Babel
1. translate the express server to claudia-api-builer in the `service.js` file and run `npm run build` to get a production build in `index.js` file in the root directory (required by Claudia)
Use `claudia create --name api-name --region us-east-1 --api-module index` to deploy and create a new function on AWS Lamba, and `npm run update` to update it. Change api-name for whatever name you want, and region to your region of choice.
## License
Use as you like.