This is a chess web app game built on express js framework_
To run this web applcation with success you have to create a mysql database instance.
{
host: 'localhost',
user: 'chess',
password: 'chess',
database : 'chess_db'
}
First on all install every module :
$ cd Chess
$ npm install
Creat the db, the user and grant privileges:
CREATE DATABASE chess_db;
CREATE USER 'chess'@'localhost' IDENTIFIED BY 'chess';
GRANT ALL PRIVILEGES ON chess_db.* TO 'chess'@'localhost';
To dump the db to a file :
$ mysqldump -u chess -p chess_db > database/dump.sql
To import the db :
$ mysql -u chess -p chess_db < database/dump.sql
If you want to modify a model then you should apply changes to db :
$ node models/migrations.js
To run the server in debug mode:
$ DEBUG=chess:* npm start
To run in production mode :
$ NODE_ENV=production npm start