Before you run the project, make sure to install all packages first by running npm install
After that, you will need to install nodemon
package. This package is used to ease development process by auto-restarting the server everytime there is any changes saved. To run the server, use this command nodemon src/index.ts
[https://www.npmjs.com/package/nodemon]
To check whether your server is already running, open your browser and insert this address [http://localhost:3000/]. You should be able to see a sample "Hello World!" string returned.
To stop the server, navigate to your terminal and press CTRL+C
*** Remarks ***
remember to run npx prisma migrate deploy
to make sure the migration other people created will execute on your db
- (POST) /auth/login
body: username, password
- (POST) /auth/validate-token
body: token
- (POST) /auth/refresh-token
body: refreshToken
- (POST) /auth/revoke-token
header: token (this is access token)
body: token (this is refresh token)
- (GET) /auth/{id}/refresh-tokens
header: token
- (GET) /user
header: token
- (GET) /user/{id}
header: token
- (POST) /user/create
header: token
body: username, password, lastName, firstName, mobile, email, role
- (PUT) /user/update
header: token
body: id, lastName, firstName, mobile, email, role
- (PUT) /user/change-password
header: token
body: userId, currentPassword, newPassword