You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lbeckman314 f8c1f3d9e9 Updated program.sql. 1 year ago
config removed config.js 1 year ago
models added login and fatal error handling 1 year ago
public Updated program.sql. 1 year ago
routes updated signup api 1 year ago
views added login and fatal error handling 1 year ago
.build.sh added login and fatal error handling 1 year ago
.gitignore updated README.md 1 year ago
README.md Updated with personal programs. 1 year ago
database.js added login and fatal error handling 1 year ago
date updated build script 1 year ago
dbcon-example.js moved dbcon.js to dbcon-example.ls 1 year ago
makefile update program.sql 1 year ago
package-lock.json added login and fatal error handling 1 year ago
package.json added login and fatal error handling 1 year ago
users.sql added login and fatal error handling 1 year ago

README.md

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