This project is an API used by a Firefox extension to set and get created notes. The API is built using Node.js and utilizes the Express framework.
To get started with the project, follow these steps:
- Clone the repository onto your local machine using
git clone <repository_url>
- Run
npm install
to install all dependencies required for the project. - Create a
.env
file in the root directory and specify the environment variablesPORT
(the port number for the server to listen on) andMONGO_URL
(the URI for the MongoDB database to use). - Run
npm start
to start the server.
The following endpoints are available in the API:
Creates a new note in the database. The request body should contain a JSON object with a id
and note
field.The note will be automatically deleted after 20 minutes.
Retrieves a specific note with the given id
from the database.
The project uses the following dependencies:
express
: web application frameworkmongoose
: MongoDB object modeling tooldotenv
: loads environment variables from a .env filecors
: enables Cross-Origin Resource Sharing (CORS)
We welcome contributions from the community! Please refer to the CONTRIBUTING.md file in the repository for more information on how to contribute to the project.
The project is licensed under the MIT License. See the LICENSE file in the repository for more information.