This project was created by Kevin Phan, Elodie Bouthers, and Neil Oribello as part of the Light House Labs Midterm Project. Light Kicks is 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.
Midterm Project Requirements:
- ES6 for server-side (NodeJS) code
- NodeJS
- Express -- RESTful routes
- One or more CSS or UI "framework"s:
- jQuery
- A CSS preprocessor such as SASS, Stylus, or PostCSS for styling -- or CSS Custom properties and no CSS preprocessor
- PostgreSQL and pg (with promises) for DBMS
- git for version control
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
Additional Features:
- 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/