Driver Deluxe Server is the backend part of the Driver Delux web application built with Node.js and Express.js. This backend includes the Google Maps API for map usage and a News API (newsapi.org).
- Clone the repository
- Install dependencies: npm install
- Create a
.env
file in the root directory of the project. - Add the following environment variables to the
.env
file:
NEWS_API_KEY
: YOUR ACTUAL NEWS API KEYVITE_GOOGLE_MAPS_API_KEY
: YOUR ACTUAL GOOGLE MAPS API KEY (You can get these keys by going to the Google Maps API and newsapi.org and create free keys to use here.)
- Save the
.env
file.
- Start the server with
npm run dev
on your console. - The server will be running on our deployed backend, but you can change that in the
.env
file by addingORIGIN=http://localhost:5173
so it runs on this port instead of our deployed version.
-> All endpoints have /api
before them.
- Sign up a new user.
- Login a user.
- Only used to verify the user.
- Adds a new service to the backend.
- Shows all of the services available on the API.
- Returns the services of have a specific type.
- ex:
/services/norauto
-> will return all services with 'norauto' type.
- Returns one single service by its ID.
- ex:
/services/oneItem/123456789
-> will return the service with the id: 123456789.
- Returns all of the bookings of one specific user that has its own Id.
- ex:
/users/12345/bookings
-> will return all bookings made by the user with the id: 12345.
- Adds a new service to the bookings on the backend, including the user id that created the booking.
- Deletes a specific booking from a specific user.
- ex:
/services/users/1234/bookings/6789
-> will delete the booking with id: 6789 made by the user with id: 1234.
- Returns 100 articles about TVDE news going on all over the world.
- Returns the Google map.
Deploy the backend to a hosting service like Render.
- This project was created by:
- Orlando Pedrazzoli
- Guilherme Carvalho