Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
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!