-
Environment Variables, to set up the necessary environment variables for this project:
- Run the command
cp .env.example .env
to create a copy of the.env
file. - Open the
.env
file and fill in the required values.
- Run the command
-
For project dependencies, run install-dependencies script
node scripts\install-dependencies.js
-
Running project with
npm start
You can access the Postman Collection from here.
Endpoint: /login
Method: POST
URL: http://localhost:3000/login
Request Headers:
Cache-Control: no-cache
Postman-Token: <calculated when request is sent>
Content-Type: application/json
Content-Length: <calculated when request is sent>
Host: <calculated when request is sent>
User-Agent: PostmanRuntime/7.32.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Request Body (JSON):
{
"username": "testuser",
"password": "password"
}
Endpoint: /register
Method: POST
URL: http://localhost:3000/register
Request Headers:
Cache-Control: no-cache
Postman-Token: <calculated when request is sent>
Host: <calculated when request is sent>
User-Agent: PostmanRuntime/7.32.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: application/json
Request Body (JSON):
{
"user_name": "testuser",
"password": "password",
"email": "test@example.com",
"phone": "12345667",
"city": "Ankara"
}
Endpoint: /add-fav-place
Method: POST
URL: http://localhost:3000/add-fav-place
Request Headers:
Cache-Control: no-cache
Postman-Token: <calculated when request is sent>
Host: <calculated when request is sent>
User-Agent: PostmanRuntime/7.32.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: application/json
Request Body (JSON):
{
"list_id": 1785,
"place": {
"name": "Central Park",
"city": "New York",
"location": {
"lat": 40.785091,
"long": -73.968285
},
"address": "New York, NY 10024, USA"
}
}
Endpoint: /add-visited-place
Method: POST
URL: http://localhost:3000/add-visited-place
Request Headers:
Cache-Control: no-cache
Postman-Token: <calculated when request is sent>
Host: <calculated when request is sent>
User-Agent: PostmanRuntime/7.32.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: application/json
Request Body (JSON):
{
"list_id": 1785,
"place": {
"name": "Central Park",
"city": "New York",
"location": {
"lat": 40.785091,
"long": -73.968285
},
"address": "New York, NY 10024, USA"
}
}