Developed Server Side Code for a basic dating app
- Server-Side Runtime Environment - NodeJS
- Server-Side Framework - ExpressJS
- Database - MongoDB
- Testing - chai framework, travis
- DevOps - Docker (containerization)
- Deployment - AWS EC2 and Heroku
- AWS URL - http://ec2-34-207-165-245.compute-1.amazonaws.com/
- Heroku URL - https://quillhash-dating.herokuapp.com/
Two ways to run the app (https://localhost:8000/)
docker-compose up --build
-> Preferred- Go to .env file and NODE_ENV=production
npm install
npm start
Two ways to run the test suite
docker-compose -f docker-compose-dev.yml up --build
-> Preferred- Go to .env file and NODE_ENV=test
npm install
npm test
-
Register a user
POST /auth/register - body(name, email, contact, password)
-
Login
POST /auth/login - body(email, password)
-
Fetch my profile details
GET /profile/me - header("x-access-token": <jwt token received after login>)
-
Fetch other user's profile details if not blocked
GET /profile?id=<user_id_1212> - query("id": <id of the required user >)header("x-access-token": <jwt token received after login>)
-
Block a user
PUT /block - body(id: <user_id of the user to be blocked>) - header("x-access-token": <jwt token received after login>)
-
Unblock a user
PUT /unblock - body(id: <user_id of the user to be unblocked>) - header("x-access-token": <jwt token received after login>)
-
Post an image for my profile (Content-Type: null)
PUT /image - file(image: <image to be uploaded>) - header("Content-Type": null, "x-access-token": <jwt token received after login>)
-
Like an image (normal or super like)
PUT /image/like - body(image_id: <id of the image to be liked>, like_type: <normal or super>) - header("x-access-token": <jwt token received after login>)
Screenshots depicting manual route testing on POSTman, and AWS terminal in the "screenshots" folder