-- create database "biblioteca_main"CREATEDATABASEbiblioteca_main;
-- create user "biblioteca"CREATEUSER 'biblioteca'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON biblioteca_main.* TO 'biblioteca'@'localhost';
FLUSH PRIVILEGES;
mysql -u biblioteca -p -h localhost biblioteca_main
source public/program.sql
source public/program.sql
\q
To add login capabilities
-- create database "biblioteca_users"CREATEDATABASEbiblioteca_users;
-- create user "biblioteca_login"CREATEUSER 'user'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON biblioteca_users.* TO 'biblioteca_login'@'localhost';
FLUSH PRIVILEGES;
Run server
cp config/config-example.json config/config.json
# add USERNAME and PASSWORD information
npm install
node database.js PORT