You need npm, node, docker, docker-compose
You also need to copy the .env-sample
to a .env
file, and add values to the evnironment variables.
In the root directory of the project run:
npm install
docker-compose up
node server.js
Now you can just access the localhost:{$PORT}/register
You can use these credentials in order to register:
- Teacher Logins and Generates self expiring code for the subject
- Student Logs In and Uses the code to update their attendance status for the Subject
- Teacher can see the present Students in a subject for:
- today
- this week
- this month
- this year
- Student can see Attendnance for each of their Subjects:
- today
- this week
- this month
- this year
Look for more documentation at the docker-compose.yml
.
docker-compose up
docker-compose up
(this will the MySQL server as well as the App)
The first time you run this command it will spin up an empty mysql DB and then it will run all the scripts in ./sql
Shut down with ctrl+C . Any changes you make are persisted in the sqldb
volume and will be available next time you run docker-compose up
.
docker-compose down -v
This will remove the containers and the sqldb
volume, so all DB data are removed.
This is useful when you make changes to the schema and you want to rerun the DDL scripts on your local machine.
cat ./path-to-your-script-here.sql | mysql -h 127.0.0.1 -P 3306 -u root -pdatabases
We can use this library to auto-generate our javascript models.
We can run this command sequelize-auto -h localhost -d rollcall_db -u root -x databases -p 3306 --dialect mysql -o ./models/ -v true
We have made a shortcut for this command at out package.json
, so one can just run npm run generate-models
Remember that the databse must be up and running when you run this command.