This is a TypeScript ExpressJS application that serves as an API-only application using AWS Serverless Functions. It provides endpoints to handle various API requests. The application is designed to be deployed on AWS Lambda using the serverless framework.
Make sure you have the following installed on your system:
- Node.js (version 18 LTS or higher)
- Yarn (preferred package manager)
- AWS CLI (configured with appropriate credentials)
- Serverless framework (optional for deployment)
To run and deploy this application locally, follow the instructions below.
-
Clone the repository:
git clone <repository_url>
-
Navigate to the project directory:
cd <project_path>
-
Install dependencies using Yarn:
yarn install
Make sure you have configured your AWS CLI with valid credentials. You can set up your AWS credentials using the aws configure
command.
To start the application locally for development, run the following command:
yarn web:start:dev
The API will be accessible at http://localhost:3000
.
This application can be deployed to various platforms or services that support Node 18 runtime.
The current setup allows serverless infrastructure setup using AWS Lambda functions. The cloudformation template is generated using the serverless framework.
-
Install serverless
yarn global add serverless
-
Configure AWS CLI: aws.amazon.com/cli
-
Install serverless plugins
yarn install
-
Build application
yarn build
-
Trigger Deployment
serverless deploy
The following API endpoints are available:
GET /api/v1/welcome
: Retrieves hello world message.
For detailed information about request/response formats and example usage, please refer to the API documentation.
To run the unit tests, execute the following command:
yarn test
This will run the test suite and provide feedback on test coverage and test results.
Contributions are welcome! If you find any issues or want to suggest improvements, please create a GitHub issue or submit a pull request.
This project is licensed under the MIT License. Feel free to use and modify the code as per your needs.