This is a project originally built for G2T4, CS203 project. It has been exported to a separate GitHub repository for further development without affecting the original repository.
It is a microservice built using express.js and uses the OneMap API.
Here is a demo.
# Populate .env files
cp .env.example .env
# Remember to fill up the values in GitHub secrets if necessary
npm install
npm start
# If you are in windows
npm start windows
The main website can be accessed at the root of the website.
The following endpoints are available and exposed for users to retrieve the restaurants in a specific object. This object can be parsed by the LeafletJS plugin to pin out restaurants on the Singapore map.
The prefix for all the API URI is /api/v1
.
Method | Endpoint | Body | Description |
---|---|---|---|
GET | /restaurants | NIL | Retrieve all the restaurant data as a FeatureCollection object |
POST | /restaurants | Restaurant in JSON with apikey | The Java backend will send a restaurant DTO in JSON |
To run it in production mode, run the command npm run prod
. Else, you may follow the instructions to spin up a docker instance.
docker-compose up -d --build
# to stop
docker-compose down
I am grateful for the creators of ura-subzones which I have kindly used the functions exposed in mapper.js to accurately map coordinates to subzones in Singapore. Currently, there is no free and efficient method to perform this action.