This is a basic template for creating an Express API in AWS lambda using Serverless and TypeScript.
- Node.js (recommended version: 16.x)
- yarn (package manager)
-
Clone the repository:
git clone https://github.com/luisccode/serverless-typescript-express-example.git
-
Navigate to the project directory:
cd serverless-typescript-express-example
-
Install the dependencies:
yarn
-
Deployment to AWS Lambda:
yarn run deploy
This will package and deploy the application to AWS Lambda using the Serverless framework. Make sure to configure your AWS credentials before running this command.
-
Remove the application from AWS Lambda:
yarn run remove
This will remove all the resources related to the deployed application from AWS Lambda.
The project follows the following directory structure:
index.ts
: Main file of the Express application.serverless.yml
: Configuration file for deployment to AWS Lambda using the Serverless framework.tsconfig.json
: TypeScript configuration file.
If you would like to contribute to this project, please follow these steps:
- Create a fork of the repository.
- Create a branch for your new feature (
git checkout -b new-feature
). - Make the changes and commit them (
git commit -am 'Add new feature'
). - Push your changes to the remote repository (
git push origin new-feature
). - Open a pull request on GitHub.