A RESTful service that implements API to manage and query event data based on various parameters.
- Node.js
- Express.js
The database of choice is MongoDB, due to its flexible schema and native support for geospatial querying. With MongoDB, I can efficiently store and retrieve event data, including coordinates for location-based queries. This flexibility and built-in geospatial indexing make it an ideal choice for implementing APIs for events in this assignment.
Below are the steps to clone and run the project locally on your system:
-
Clone the repository by running:
git clone https://github.com/dev1912-sbt/gg-backend-assignment.git
-
Open a Terminal inside the Project root.
-
Install required dependencies by running:
npm install
NOTE: If you do not wish to install the
devDependencies
, you can run the following command instead:npm install --omit=dev
Please note that you will not be able to run the test cases if there are no
devDependencies
installed. -
Create a ".env" file in the project root and insert the following fields:
Field Notes PORT
Port for Express server to listen to MONGOOSE_DB_URI
Mongoose Connection String -
(Optional) If you have installed the
devDependencies
, you can run the test cases by running:npm test
-
Start the application by running:
npm start
You can find the API documentation in docs/README.md.