Skip to content

artweb11/restserver-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

restserver-mysql

Just a REST server based on express, interacting with a mysql database

INSTALATION:


Run "npm install" in the directory.

INSTALL DATABASE


You can import the database in the folder database, or you can type "npm run provision" and enter the root mysql password. If there's an error, make sure the mysql executable is in the path.

Additionally, you can uninstall the database by typing "npm run unprovision" and enter your root mysql password. The database will be dropped.

RUN SERVER


You can start the application with the command "npm start". This will the server on the default port 3000.

Available REST points:

GET /books

GET /books?[filter]=[query] - type, name, year, author

GET /books/:id - get book by id

POST /books ( requires all params: name, type, year, author )

PUT /books/:id - update book by id

DELETE /books/:id - delete book

About

Just a REST server based on express, interacting with a mysql database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published