This is the backend for Post Web App.
- Send presigned url for image uploads to s3.
- AWS RDS with MySql for database.
- Clone the repository:
git clone https://github.com/kumang-subba/post-webapp-api.git - Navigate to the project directory
- Install dependencies:
npm install - Start the backend server:
npm run start
- AWS s3 Configuration: Set up an AWS S3 bucket for secure image storage and retrieval
- Add proper access and policies to the bucket
- Setup cors configuration in the bucket
- Add an IAM user with appropriate access and attach required policies
- Create MySQL database in AWS RDS
- Remember to select the Free tier (!important)
- Database username and password is created when database is created
- Edit inbound rules to allow traffic from your ip i.e "My IP"
- Database host is Endpoint in connection & security on the DB's instance page.
.env sample
BUCKET_NAME=
BUCKET_REGION=
AWS_USER_ACCESS_KEY_ID=
AWS_USER_SECRET_ACCESS_KEY=
DATABASE_NAME=
DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_PORT=
DATABASE_HOST=
JWT_SECRET_KEY=