https://github.com/sonikro/nodejs-api-aws-terraform-gha
Repository used in presentation about cloud development
https://github.com/sonikro/nodejs-api-aws-terraform-gha
actions aws ecs express fargate gha github jest load-balancer nodejs terraform terragrunt typescript
Last synced: 3 months ago
JSON representation
Repository used in presentation about cloud development
- Host: GitHub
- URL: https://github.com/sonikro/nodejs-api-aws-terraform-gha
- Owner: sonikro
- License: apache-2.0
- Created: 2022-06-15T13:40:59.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-02-14T11:36:26.000Z (4 months ago)
- Last Synced: 2026-02-14T20:06:00.781Z (4 months ago)
- Topics: actions, aws, ecs, express, fargate, gha, github, jest, load-balancer, nodejs, terraform, terragrunt, typescript
- Language: HCL
- Homepage:
- Size: 521 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
## Badges
[](https://github.com/sonikro/nodejs-api-aws-terraform-gha/actions/workflows/release.yaml)
[](https://opensource.org/licenses/Apache-2.0)
# nodejs-api-aws-terraform-gha
This project is a sample NodeJS API with Typescript, and is being used to demonstrate the process of developing and deploying an application to production.
## Tech Stack
**Server:** Node, Express, Typescript, Jest
**Infrastructure-as-Code**: Terragrunt, Terraform
**CI/CD**: Github Actions
**Cloud**: AWS
**Cloud Resources**: ECS, ECR, Load Balancers, VPC, Route53, Cloudwatch, IAM
## Run Locally
Clone the project
```bash
git clone https://github.com/sonikro/nodejs-api-aws-terraform-gha.git
```
Go to the project directory
```bash
cd nodejs-api-aws-terraform-gha
```
Install dependencies
```bash
yarn
```
Start the server
```bash
yarn start
```
## Environment Variables
To run this project, you will need to add the following environment variables to your .env file
`PORT` | Default to 8080
## Running Tests
To run tests, run the following command
```bash
yarn test
```
## API Reference
#### Get all customers
```http
GET /customer
```
#### Create a Customer
```http
POST /customer
{
"id": "1",
"email": "some@email.com",
"name": "Some name"
}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `body` | `json` | Customer being added|
## Integration between Github and AWS
To connect your runner to your AWS Account, you need to setup an OIDC in AWS to allow your repository to assume a specific role.
For more information, see [https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services)
> :warning: **Deploying this to your AWS Account will incur costs**: