-
Just go on official Node.js website and download the installer. Also, be sure to have
git
available in your PATH,npm
might need it (You can find git here). -
You can find more information about the installation on the official Node.js website and the official NPM website.
cd into the project directory and
npm install
- Make sure you have table called 'users' with columns ('username', 'password','email') and table called 'admin' with columns ('username','password').
- Add a username and password in admin.
- Edit resources/questions.csv file and put your own questions.
- Add your mysql credentials to server/db.js file.
- Run server/server.js.
- Run user/login.html using live server.
- When server/server.js is started, it creates 'marks' table (if not found) or drops the old 'marks' tables and creates new one (if found).
- When user/login.html is launched using live serve, it first checks for cookies (login credentials) and validates with server.js ('users' table in mysql), if credentials match, user is taken to user/index.html else you need to login and then if server.js says you are good to go then you will be redirected to user/index.html.
- When user/index.html is accessed it will first check and validates your credentials using cookies, if something's wrong you will be taken back to login page, or if everything is good it will request server for questions and options to display them to you.
- Everytime you move to another question the selected option is sent to server to store it in 'marks' table.