Local server installation (Linux)

To save the quiz results permanently, you need to configure your computer (your PC or laboratory server) to collect the data and store it permanently.
To do this, we have chosen to use two of the most effective, light, fast and widely used technologies, Node.js to the server part and MariaDB or MySQL for the database part.


Node.js is one of the most revolutionary JavaScript frameworks of the last decade, as it allows you to use V8, Google's JavaScript interpreter. This allows developers to create web applications with JavaScript not only on the client side, but also using it as a server-side programming language.

For installation, the referral link is: https://github.com/nodesource/distributions/blob/master/README.md

For example, for UBUNTU :

	sudo apt install curl
	curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
	sudo apt-get install -y nodejs

For the version of Node.js, type from the command prompt:

	node -v


MariaDB is a DBMS (Database Management System) born in 2009 from a fork of MySQL created from the original programmer of that program.

For installation, a useful link is : https://linuxize.com/post/how-to-install-mariadb-on-ubuntu-20-04/

For example, for UBUNTU :

	sudo apt update
	sudo apt install mariadb-server

For the MySQL version, type from the command prompt:

	mysql -V 

Initially, the database root password is the same as the Linux root user, so the database can only be accessed with the command:

	sudo mysql -u root

To configure QuizFaber it is instead necessary to assign a password to the MySQL root user. To do this, once you have run the previous command, you enter the SQL command prompt. Then type:

	UPDATE mysql.user SET plugin = 'mysql_native_password', Password = PASSWORD('NEWPASSWORD') WHERE User = 'root';

Obviously, change NEWPASSWORD to a password of your choice.

Related topics