Data Source
sudo apt install mysql-server
make mysql accessible outside the network: sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
change line: bind-address = 127.0.0.1 to bind-address = 0.0.0.0
Restart MySQL service: sudo service mysql restart
###Running the server:
Pre-Requisites:
- node
- git
- Read/Write permissions on a directory
- Network access to the system being used
- Browser and or API REST Client like PostMan
Steps:
open Terminal
- clone this project using:
git clone https://github.com/emmanuelstroem/booksback.git
cd
intobooksback
- run
npm install
to install all the required node modules - install nodemon using:
npm install -g nodemon
- run the project using:
nodemon
or simplynode app.js
Access:
-
API will be running on port
:3000
-
Open browser or REST client and enter
machine ip:3000
BOOK ROUTES:
GET all books:
books/
GET single book details
books/{id}
POST new book
books/add
PUT new book details
books/{id}
AUTHOR ROUTES:
GET all authors
authors/
GET single author details
authors/{id}
POST new author
authors/add
PUT author details
authors/{id}