Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neofoxxo/weather-api-mongodb
Weather REST API built with Express.js & MongoDB
https://github.com/neofoxxo/weather-api-mongodb
express-js jwt-auth mongodb openapi3 rest-api
Last synced: about 2 months ago
JSON representation
Weather REST API built with Express.js & MongoDB
- Host: GitHub
- URL: https://github.com/neofoxxo/weather-api-mongodb
- Owner: NeoFoxxo
- Created: 2023-08-31T04:12:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-06T03:11:29.000Z (about 1 year ago)
- Last Synced: 2024-04-24T05:24:43.328Z (8 months ago)
- Topics: express-js, jwt-auth, mongodb, openapi3, rest-api
- Language: JavaScript
- Homepage:
- Size: 6.05 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Weather Sensor API
This weather sensor API is a secure REST API built with Express.js, MongoDB, and Mongoose. It features a fully functional API where users can query weather information stored in a MongoDB database.
This API was built using the OpenAPI 3 standard and its documentation can be viewed below:
View API Documentation## Features
* 🛡️ Secure authentication with JWT's
* 🔒 Create and use accounts with full password encrytion
* 🚪 Role-based access control to secure endpoints
* ✅ Validation to prevent unexpected data from being inserted
* 🌡️ Add new weather readings
* 👥 Add new users with specified roles
* 📊 Seven different endpoints to query, manipulate, and add weather data
* 🔍 Five different endpoints to filter, create, and manipulate user accounts## Endpoints
## How To Run It
To run this on your local machine, you will need to have Node.js installed and access to a MongoDB database.1. Clone the repository to your local machine
2. Import the database folder to your MongoDB server with `mongorestore`
3. Create a `.env` file in the root directory and add a `DATABASE_URL` and `ACCESS_TOKEN_SECRET`
4. Open your terminal and run `npm install`
5. Run the `npm run start` command
6. Access the API on port 5000 and enjoy!