Skip to content

Latest commit

 

History

History
77 lines (64 loc) · 2.45 KB

README.md

File metadata and controls

77 lines (64 loc) · 2.45 KB

croosbooking
BookCrossing

Node.js Practice

The Rest API that registers shared books, reviews of those who have read it, and location of points where you can find books that are part of this social network.

About the project   |    Installation   |    Routes   |    Licence

🚀 About the project

An API Rest made with Node.js,Express and MongoDB to register books, users and the database will grow with the insertion of records from several users in various geographic locations. With a simple click, the app will return points of releasing books closest to you within a radius of 300 km.

🏁 Installation

First of all, make sure that you have Node.js installed on your machine. Choose a package manager (NPM or Yarn). You will need to create a mongoDB database too. Follow this link to create one: (https://www.mongodb.com/try/download/community).


Now, to install the dependencies

npm install

To start the application with nodemon

  npm run dev
  

To start the application with node

  npm start
  

API Test

You will need a API Client,you can use:

  • Postman
  • Insomnia
  • Thunder Client (extension for vsCode)

📨 Routes

Every URL starting with ‘/api’ . Example:

http://localhost:3000/api/books

To search by Id, update or delete

http://localhost:3000/api/books/:id

To filter results by query parameters

http://localhost:3000/api/nearby/?lng=-80&lat=2

If you are interested in more information about bookcrossing, access: https://www.bookcrossing.com/

Create a JSON object to pass in the Body field
{
    "name": "Taz - Temporary Autonomous Zone",
    "auth": "Hakim Bey"
}

📝 Licence

Mozilla Public License Version 2 LICENSE for more details.

Made with ♥ by Gabriel 👋 See my linkedin!