Skip to content

It is a small RESTful project to realize a CRUD bookshelf with Node.js. The user enters a favorite book name, clicks on the button, and the book name gets stored in a database. Then it redirects to a page (or uses the same page) to show the list of all favorite books stored in the database.

Notifications You must be signed in to change notification settings

kaiagaoqy/TinyCrudBookShelf

Repository files navigation

Tiny-CRUD-BookShelf

It is a small RESTful project to realize a CRUD bookshelf with Node.js.

The user enters a favorite book name, clicks on the button, and the book name gets stored in a database. Then it redirects to a page (or uses the same page) to show the list of all favorite books stored in the database.

Stack

  1. Framework: Node.js, express, ejs
  2. DataBase: MongoDB
  3. Frontend: BootStrap

Deployment

Node.js

"dependencies": { "body-parser": "^1.20.0",
"ejs": "^3.1.8",
"express": "^4.18.1",
"lodash": "^4.17.21",
"mongoose": "^6.6.1",
"nodemon": "^2.0.20"
}

npm i body-parser
npm i express   
npm i mongoose 
npm i lodash
npm i ejs

MongoDB

  1. Download MongoDB locally and install Mongosh
  1. Test your Mdatabase
  • Run mongosh without any command-line options to connect to a MongoDB instance running on your localhost with default port 27017:
  • This is equivalent to the following command:
$ mongosh "mongodb://localhost:27017"

More detail to initiate MongoDB

Run

  1. Initiate Database
  • This project use default local port
$ mongosh
  1. Run main code
node main.js

image

Functions

Home Page

home-page

List Page

list-page

Add Page

add-page

About

It is a small RESTful project to realize a CRUD bookshelf with Node.js. The user enters a favorite book name, clicks on the button, and the book name gets stored in a database. Then it redirects to a page (or uses the same page) to show the list of all favorite books stored in the database.

Resources

Stars

Watchers

Forks

Packages

No packages published