A serverless image sharing application example using Serverless Framework
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.
- 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
- Install the dependencies listed above.
- Create a configuration file in the
back-end
directory based on the example configconfig.json.example
named config.json
cd back-end
npm install
sls deploy
- 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.
cd front-end
npm install
npm start
- Open your browser to http://localhost:8100
More info on how to use the serverless commands can be found in serverless commands
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/
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 |
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.