- NodeJS installation min v16.17.1
- ExpressJS
- MongoDB in-memory
- Mongoose
- JsonWebToken for user login
- Bcrypt to encrypt password
- Cucumber testing
- Dotenv for custom variable
- Nodemon
- Fastest Validator for validation
npm i
cp .env.example .env
npm run start
npm run test
.postman
npm run test
- Create Profile
{{BASE_URL}}/profile
- Get Profile By Id -> return view
{{BASE_URL}}/profile/{{profileId}}
After Profile created, then login to comment and react
{{BASE_URL}}/login/
-> user will get token
Using token from login
- Create Comment
{{BASE_URL}}/profile/{{profileId}}/comment
- Get Comment
a. sort by latest (upatedAt)
{{BASE_URL}}/profile/{{profileId}}/comment?sort=updatedAt
b. sort by most of like comment{{BASE_URL}}/profile/{{profileId}}/comment?sort=like
- Update Comment
{{BASE_URL}}/profile/{{profileId}}/comment/{{commentId}}
Like/Dislike
Using token from login and commentId from create or get comment
{{BASE_URL}}/profile/{{profileId}}/comment/{{commentId}}/react