NodeJS API for Listen2Help App that help therapists connect with their patients.
- One commit per subtask
- Title in English, beginning with a verb in the present
- The title must not reach 50 characters
- Completed subtask:
taskCode
+title
- Unfinished subtask:
taskCode
+WIP
+title
Make sure you have NodeJS installed.
Then clone the Repo and run npm install
or npm i
to install node modules.
Run npm start
to run the server in http://localhost:8080/
.
Of course, you can change the port in the .env
file.
Every file that is created, must follow the following standard: file_name.{sorter}.js
.
- Where
{sorter}
means the name of the source file we are creating. Example:name.controller.js
,name.middleware.js
orname.route.js
.
Variables should be named with CamelCase and must represent the action for which they were created.
The name must represent the action for which they were developed. Example: GetTherapistById
or PostTherapist
.
These endpoints are defined in its own route file. And every route file is instantiated in the endpoints.js
file.
Endpoint routes names must follow the following standards:
- Get multiple resources or post a new one:
/controller_name
. - Get, edit and delete single resource:
/controller_name/resource_id
.
In the project you'll find the constants.shared.js
file, where you can declare every message that is sent as a response to the client.
200 OK
: When is a successful request.201 Created
: When is a successful PUT request.400 Bad Request
: When something is wrong in the request, as a bad data type, or a field not entered, etc.404 Not found
: When there are not found resources in the request.500 Internal Server Error
: Used when you catch problems on the server.