/movie-tracker

An API to help keep track of movies I watch

Primary LanguageTypeScript

Serverless Movie Tracker API

Installation/deployment instructions

Depending on your preferred package manager, follow the instructions below to deploy your project.

Requirements: NodeJS lts/fermium (v.16.17.0). If you're using nvm, run nvm use to ensure you're using the same Node version in local and in your lambda's runtime.

Using NPM

  • Run npm i to install the project dependencies
  • Run npm run deploy:<STAGE> to deploy this stack to AWS

Using Yarn

  • Run yarn to install the project dependencies
  • Run yarn sls deploy to deploy this stack to AWS

Test your service

  • Run npm run test to test locally after setting environment variables in a .env file

⚠️ As is, this template, once deployed, opens a public endpoint within your AWS account resources. Anybody with the URL can actively execute the API Gateway endpoint and the corresponding lambda. You should protect this endpoint with the authentication method of your choice.

Locally

In order to test the hello function locally, run the following command:

  • npm start

Remotely

Copy and replace your url - found in Serverless deploy command output - and name parameter in the following curl command in your terminal or in Postman to test your newly deployed application.

curl --location --request 'https://myApiEndpoint/dev/movies'

CI/CD

There are AWS CodePipelines set up for deployment to each stage CodePipeline