This is a Buy/Sell Listing Website. An app where you can put different types of shoes up for sale. This lets buyers find the items they are looking for quickly, and easily contact sellers.
Users Can:
- users can see featured items on a main feed
- users can filter items by price,
- users can favourite items to check up on them later, and access a favourites page
- users can send email to the admin that is listing the item
Admins can:
- add/post items, which can be seen by others.
- remove/delete items from the site
- mark items as SOLD!
- send an email back to the buyer
Others:
- If a user try to access the http://localhost:8080/admin, or http://localhost:8080/addproduct, without being logged in, an error message will appear: "Unauthorized Access".
- If a user doesn't exist in our database and try to login, an error meassage will show : "sorry you are not a user".
- Only users from our database can login.
- If the user is also an admin, the admin has access to "My favourites", "Admin" and "Add product". If the user is not an admin, the "Admin" and "Add product" sections won't show in the header.
- Once a user logged in, the email@ is appearing in the header.
- Once a new item is posted by the admin, an alert confirming that the product has been posted is showing up.
- By clicking on logout, the user can logout.
- we added a customize logo in the head of the page
- Create the
.env
by using.env.example
as a reference:cp .env.example .env
- Update the .env file with your correct local information
- username:
labber
- password:
labber
- database:
midterm
- Install dependencies:
npm i
- Fix to binaries for sass:
npm rebuild node-sass
- Reset database:
npm run db:reset
- Check the db folder to see what gets created and seeded in the SDB
- Run the server:
npm run local
- Note: nodemon is used, so you should not have to restart your server
- Visit
http://localhost:8080/
Install all dependencies : npm install
- "body-parser": "^1.19.0",
- "chalk": "^2.4.2",
- "cookie-session": "^1.4.0",
- "dotenv": "^2.0.0",
- "ejs": "^2.7.4",
- "express": "^4.17.1",
- "morgan": "^1.9.1",
- "node-sass-middleware": "^0.11.0",
- "nodemailer": "^6.5.0",
- "pg": "^6.4.2",
- "pg-native": "^3.0.0"
Run the development web server : npm start Run the app on your browser: http://localhost:8080/