A demo serverless web application created with the Serverless Framework.
To learn more visit Serverless Learn.
Setting up Our Environment
First, clone this repository.
Using SSH -
git clone firstname.lastname@example.org:fernando-mc/libertyjs-jams.git
Or using HTTPS -
git clone https://github.com/fernando-mc/libertyjs-jams.git
cd libertyjs-jams and make sure you see two folders named
frontend and a file called
- Install a stable version of Node.js and npm
- Use npm to install the Serverless Framework globally
npm install serverless -g
All the code for the backend service is contained within the
backend directory as well as some sections of
backend there are two files.
get_song_vote_counts.pyfile gets all of the vote count information from the Database.
record_song_vote.pyfile allows us to increment by one vote on any song.
serverless.ymlfiles creates a DynamoDB table for our data, ties our two files to different HTTP API endpoints and creates the appropriate permissions to scan and update the DynamoDB table.
Our frontend contains a single
The endpoints will need to be set inside of the
app.js later on after the backend has been deployed.
You will also need to replace
auth_config.json with your own Auth0 API Keys.
Creating the Backend Service
app values in the
serverless.yml file to reflect your own Serverless Dashboard account.
serverless deploy in the top level directory that contains
When the service finishes deploying, make sure to save the API endpoints for the next step.
Deploying the Frontend with Serverless Finch
- Install the Serverless Finch plugin with
npm install serverless-finch --save-dev
- Configure the Serverless Finch plugin in the custom section of
- Update the
index.htmlfile with the API endpoint values that were output by deploying the backend service
serverless client deployto deploy the frontend of the application.
- Confirm that your website bucket is correct and that you wont be overwriting anything important from it and proceed with the instructions
- Review the output of
serverless client deployand navigate to your website!