jrtechs 7853fdb56e | 6 years ago | |
---|---|---|
googletrendsgame | 6 years ago | |
words | 7 years ago | |
.DS_Store | 7 years ago | |
README.md | 6 years ago | |
game.html | 7 years ago |
Guess the trends beat your friends
npm init -y
npm install --save express morgan
npm install socket.io --save
npm install mysql --save
npm install sanitizer --save
npm install google-trends-api --save
npm install promise --save
npm install async --save
npm install --save-dev babel-cli babel-preset-es2015 rimraf
###Configure Babel
touch .babelrc
In that file put:
{
"presets": ["es2015"]
}
##Database Construction
create database googleTrends;
use googleTrends;
create table users(
user_id mediumint unsigned not null AUTO_INCREMENT,
name varchar(30) not null,
primary key(user_id)
);
create table data(
data_id mediumint unsigned not null AUTO_INCREMENT,
user_id mediumint unsigned not null,
word varchar(100) not null,
score mediumint not null,
primary key(data_id)
);
grant all on googleTrends.* to trendingUser@localhost identified by "password";