/biblioteca

~ A library for all your code, great and small. ~

Primary LanguageHTML

To add main database

-- create database "biblioteca_main"
CREATE DATABASE biblioteca_main;

-- create user "biblioteca"
CREATE USER '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"
CREATE DATABASE biblioteca_users;

-- create user "biblioteca_login"
CREATE USER '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