State: in development
-
GET /api/regions : get all regions
-
GET /api/regions/districts : get all districts from all regions
-
GET /api/regions/districts/places : get all places from all districts from all regions
-
GET /api/regions/districts/{ districtId }
-
GET /api/regions/districts/places/{ placeId }
-
GET /api/regions/{ regionId }/ : get region info by ID
-
GET /api/regions/{ regionId }/districts : get all districts from selected region
-
GET /api/regions/{ regionId }/districts/{ districtId } : get district by ID from selected region
-
GET /api/regions/{ regionId }/districts/{ districtId }/places : get all available places from selected region and district
-
GET /api/regions/{ regionId }/districts/{ districtId }/places/{ placeId } : get place by ID from selected region and district
-
GET /api/regions/{ regionId }/places : get all places by region id
- Create
.env
in root directory - Set environment constant for mongoDB
mongoUri=mongodb+srv://<username>:<password>@cluster0-q5xnz.mongodb.net/Ukraine4You?retryWrites=true&w=majority
- Set environment constant for Postres DB
sqlDataBase=<Name of DB>, sqlPassword=<Your DB password>, sqlPort=<Port>, host=<host>
- Replace
<username>
and<password>
with your credentials - Install dependencies with
npm i
command - Run server with
npm start
- Open in browser
http://localhost:8080