A lightweight nodejs based bookstore where users manage books and can sell them to other users.
- NodeJs installed. (find it)[https://nodejs.org/en/]
- Text Editor of your choice. (find it)[https://code.visualstudio.com/]
- PostgreSQL installed. (find it)[https://www.enterprisedb.com/downloads/postgres-postgresql-downloads]
- ✔ Anyone should be able to register
- ✔ Anyone should be able to see all books on the page
- ✔ Anyone should be able to get all details of any User
- ✔ User(any) should be able to login into his/her account
- ✔ User(logged in) should be able to see all users on the app
- ✔ User(logged in) should be able to logout of his/her account
- ❌ User(logged in) should be able to create/publish a book in the store
- ❌ User(logged in) should be able to edit/re-publish a book to the store
- ❌ User(logged in) should be able to delete/unpublish a book from the store
To setup the project you must run the terminal command
npm run reset:dband create a.env filein project root folder based on.example.env
Then install project dependecies using the command
npm install
To start the project in development mode run
npm run devand in production modenpm start
[GET] /
:body: none
:result: Welcome screen with login and register links
[GET] /users/login
:body: none
:result: Login screen with a register link
----------------------------------------------
[POST] /users/login
:body: {
email "STRING",
password "STRING"
}
:result: Dashboard screen with a logout link & users list
[GET] /users/register
:body: none
:result: Register screen with a login link
[POST] /users/register
:body: {
name "STRING",
password "STRING",
email "STRING",
age "INTEGER",
gender "STRING",
}
:result: Login screen with register success message
- bcrypt
- Node JS
- Express JS
- mocha & chai
- jsonwebtokens
- PostgreSQL with knex
- express ejs (template engine)