/serverless-instagram

serverless image sharing website

Primary LanguagePythonMIT LicenseMIT

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

  1. Install the dependencies listed above.
  2. Create a configuration file in the back-end directory based on the example config config.json.example named config.json

Back-end deployment steps

  1. cd back-end
  2. npm install
  3. sls deploy

front-end Configuration Steps

  1. In the front-end/js directory create a config.js file based on the config.js.example file given.
  2. Copy the API gateway base url (e.g. https://xx.execute-api.us-east-1.amazonaws.com/dev) into apiBaseUrl in your front-end/js/config.js file.

front-end

  1. cd front-end
  2. npm install
  3. npm start
  4. 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

screen shot 2018-05-16 at 09 31 08

screen shot 2018-05-16 at 09 31 16

screen shot 2018-05-16 at 09 31 24

screen shot 2018-05-16 at 09 31 30

screen shot 2018-05-16 at 09 31 40

Credits:

This workshop has been inspired by:

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.