serverless-instagram
A serverless image sharing application example using Serverless Framework
Disclaimer
These steps are for linux or OSX systems. All of this is achievable using Windows but those instructions have not been provided.
This is only a demo and is not production ready.
Setup
Dependencies
- AWS Account + user with API keys with the appropriate policy (policy template)
- Auth0 Account (info on how to set it up -> auth0.md)
- Docker (only for Mac and Windows)
- AWS CLI https://aws.amazon.com/cli/
- Node > 6 (tested with 6 and 8)
npm install serverless -g
Back-end Configuration Steps
- Install the dependencies listed above.
- Create a configuration file in the
back-end
directory based on the example configconfig.json.example
named config.json
Back-end deployment steps
cd back-end
npm install
sls deploy
front-end Configuration Steps
- In the
front-end/js
directory create aconfig.js
file based on theconfig.js.example
file given. - Copy the API gateway base url (e.g. https://xx.execute-api.us-east-1.amazonaws.com/dev) into
apiBaseUrl
in yourfront-end/js/config.js
file.
front-end
cd front-end
npm install
npm start
- Open your browser to http://localhost:8100
Additional docs
More info on how to use the serverless commands can be found in serverless commands
Overview of how things work
Credits:
This workshop has been inspired by:
- https://github.com/ACloudGuru/serverless-workshop
- https://github.com/ACloudGuru/serverless-framework-video-example
The camera image has been taken from: http://vectips.com/tips-and-tricks/how-to-create-a-camera-icon/
Licensing
This source code repository uses the MIT license and includes unmodified versions of open-source libraries whose licenses are either the same or compatible.
Here is a list of libraries being distributed and respective their licenses.
Library | License |
---|---|
Auth0-Lock 11.7 | MIT |
Bootstrap 3.3.1 | MIT |
jQuery 1.11.2 | MIT |
moment.js | MIT |
modernizr | MIT |
NOTE:
Some snippets of code were copied from various places in the internet, we made our best efforts to ensure that the original code and authors were referenced on the inline comments.