Skip to content

gabriel-ferreira-da-silva/BookBridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BookBridge

BookBridge is an API for managing book clubs, supporting endpoints for CRUD operations and managing clubs, users, books, reviews, readlist and etc..

Depencies

book bridge depends on node.js, mysql and bash.

Description Description Description

build and run

give execution permission to build.sh and all files inside scripts folder

chmod +x build.sh

Then setup the database and build the API with

./build.sh --database --restart
./build.sh --run

Tests

to run the test simply type

./build.sh --tests

or manually restart database, rebuild the API and run:

npx jest

endpoints

In request.sh file you may find examples of curl request such as

TOKEN="$(curl --header "Content-Type: application/json" 
              --request POST 
              --data '{"username":"user","password":"user"}' 
              http://localhost:4000/api/user/login 
              | jq -r '.token')"
          
curl --header "Content-Type: application/json" \
     --request POST \
     --data '{"title":"o vermelho e o negro","isbn":"00033", "token":"'$TOKEN'" }' \
     http://localhost:4000/api/book

you can execute it and other endpoints with build:

./build.sh --request --user-create
./build.sh --request --user-login

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published