Skip to content

A RESTful API built with NodeJS and MongoDB exposes endpoints to retrieve F1 drivers information

Notifications You must be signed in to change notification settings

t2ny/F1Drivers-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F1 Drivers REST API

Introduction

This REST API was built as a hobby project so that users can get F1 drivers information.

F1 Drivers REST API Features (updated as new features are added)

  • Users can get all drivers.
  • Users can search for a driver by name.

Installation Guide (If you want to run locally)

  • Fork and clone the repository here.
  • Run npm i to install all required dependencies
  • You can choose to run MongoDB Atlas cloud or a local MongoDB.
  • Create a config folder in the root of the project and add a dev.env file.
  • Inside the dev.env file add PORT=<value> and MONGODB=<value> keys.
  • Add your PORT number and MONGODB connection string.

Usage (Local)

  • Run npm run dev to start the application.
  • Connect to the API using any REST client (Postman, Insomnia...) of your choice.

Usage (Service)

  • Run npm run dev to start the application.

API Endpoints

HTTP Verbs Endpoints Action
GET /api/drivers To get all drivers
GET /api/drivers/search?name=daniel Get all drivers that matches the name query

Technologies Used

  • NodeJS This is a cross-platform runtime environment built on Chrome's V8 JavaScript engine used in running JavaScript codes on the server.
  • ExpressJS This is a NodeJS web application framework.
  • MongoDB This is a free open source NOSQL document database with scalability and flexibility. Data are stored in flexible JSON-like documents.
  • Mongoose ODM This makes it easier to work with non-relational data by creating a schema of our models.

Authors

About

A RESTful API built with NodeJS and MongoDB exposes endpoints to retrieve F1 drivers information

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published