This project provides a Serverless API for a user app using AWS Lambda, DynamoDB, and other modern tools. It's built with TypeScript and Serverless Framework, making it easy to develop and deploy serverless applications.
Follow these steps to set up and run the project on your local machine:
- Node.js (>=14.15.0)
- Serverless Framework (
npm install -g serverless
)
-
Clone the repository:
git clone https://github.com/belovetech/backend-serverless-api/tree/main/serverless-user-api cd aws-serverless-user-api
-
Install dependencies:
npm install
-
Run the application locally:
npm start
This starts the Serverless Offline plugin, allowing you to develop and test your API endpoints on your local machine.
-
Build the application:
npm run build
This builds your Serverless application, which is ready for deployment.
-
Run tests:
npm test
This runs tests using Mocha and TypeScript.
-
Lint your code:
npm run lint
This runs ESLint to analyze your code for potential issues.
The serverless.yml
file contains the Serverless Framework configuration for your application. Customize it to define your AWS resources, Lambda functions, and other settings.
The package.json
file lists the project's dependencies and provides various npm scripts for development, testing, and deployment. Make sure to keep your dependencies up to date.