npm start— Starts the server in production mode.npm run start:dev— Starts the server in development mode.npm run lint— Runs ESLint code checks.npm lint:fix— The same as above, but also automatically corrects simple errors.
GET:
{{baseUrl}}/contacts— Get all user contacts | Required: token{{baseUrl}}/contacts?page=1&limit=20— Get user contacts, page 1, 20 per page | Required: token{{baseUrl}}/contacts?favorite=true— Get all favotire user contacts | Required: token{{baseUrl}}/contacts/:id— Get contact by Id | Required: token{{baseUrl}}/users/logout— Log out | Required: token{{baseUrl}}/users/current— Get current user | Required: token{{baseUrl}}/users/verify/:verificationToken— Set the user as verified
POST:
{{baseUrl}}/contacts— Add contact | Required: name, email and phone, token{{baseUrl}}/users/signup— Sign up user | Required: email, password{{baseUrl}}/users/login— Log in | Required: email, password{{baseUrl}}/users/verify— Resend verification email | Required: email
PUT:
{{baseUrl}}/contacts/:id— Update contact | Required: name, email or phone, token
PATCH:
{{baseUrl}}/contacts/:id/favorite— Set contact as favorite | Required: favorite (true/false), token{{baseUrl}}/users— Update subscription | Required: subscription ("starter", "pro" or "business"), token{{baseUrl}}/users/avatars— Set a new avatar for the user | Required: avatar (img file), token
DELETE:
{{baseUrl}}/contacts/:id— Delete contact | Required: token