(https://github.com/boldleadsdevelopment/serverless-aws-lambda-mysql-boilerplate)
Use this repository as a starting point for connecting AWS Lambda & API Gateway to a MySQL database using the Serverless Framework.
- Serverless
- Node
- NPM
- Babel
- Webpack
- Dev is for testing development work and is based on the master code branch
- Staging is for testing stable code prior to moving into production and is based on the staging branch, which should only merge changes from master
- Production is for official, production ready, tested code and is based on the production branch, which should only merge changes from staging
- Mapped: [h/api] ()
- Production: [i] ()
- Staging: [j] ()
- Dev: [k] ()
?x=x&y=y&z=z
The primary development branch is master. Fork our main repository and follow the GitFlow model, then submit pull requests when your code is tested and ready to be merged into primary development branch.
Do not submit pull requests against, or make modifications in, staging or production.
- Make sure you have git, node, npm and serverless installed
- Make sure your AWS credentials are configured
- Clone the repository
- Run
npm install
to download and install the dependencies - Run
serverless webpack && serverless webpack serve
and load http://localhost:8000 and make sure it works as expected (this is the dev branch, it may be in development status) - Edit
handler.js
which is where the actual function code is located - Use the local web server to test your changes as you work, but take note that it is reading from the production database
- When you are happy with your changes and all files are saved:
- Bump the semver version numbers appropriately in package.json and handler.js
git add -A .
- `git commit -m "Describe your changes here"
git tag vX.Y.z
# Where X.Y.z is the semver, ie; v2.0.1git push
# Push this into AWS CC where it will automatically be built and deployed!
- Panda dance!
XXX
XXX
- XXX
- XXX