E-commerce site back-end with an admin front-end panel
To install and run the web application locally, follow these steps:
- Clone repository
git clone https://github.com/noroff-backend-1/jan23-ft-ep1-LienSimen
- Navigate to project
cd jan23-ft-ep1-LienSimen
- Install npm packages
npm install
- Create .env file with the following:
ADMIN_USERNAME = "Admin from mySQL workbench"
ADMIN_PASSWORD = "Password from MySQL workbench"
DATABASE_NAME = "Database from mySQL workbench"
DIALECT = "mysql"
DIALECTMODEL = "mysql2"
PORT = "3000"
HOST = "localhost"
JWT_SECRET="node in terminal and type 'require('crypto').randomBytes(64).toString('hex')' to create a good secret"
- Start the application.
npm start
-
Open a web browser and navigate to http://localhost:3000/doc and navigate to init at the bottom and execute to initialize database
-
Navigate to http://localhost:3000/admin and login with the admin credentials from the task
Username: Admin
Password: P@ssword2023
https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event
https://getbootstrap.com/docs/5.3/
https://stackoverflow.com/questions/34817617/should-jwt-be-stored-in-localstorage-or-cookie
https://codepen.io/AllThingsSmitty/pen/MmxxOz/
https://getbootstrap.com/docs/4.0/components/modal/
https://www.tabnine.com/code/javascript/functions/sequelize/Sequelize/close
https://sequelize.org/docs/v6/core-concepts/validations-and-constraints/
https://nodejs.org/api/crypto.html#crypto_crypto
https://stackoverflow.com/questions/6951867/nodejs-bcrypt-vs-native-crypto
v20.9.0
Axios Jsonwebtoken Mysql2 Sequelize Bootstrap Dotenv Jest Supertest Swagger-autogen Swagger-ui-express Dev: Sequelize-cli