not really known
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.

62 lines
1.1 KiB

6 years ago
6 years ago
6 years ago
  1. # GoogleTrendsGame
  2. Guess the trends beat your friends
  3. ![alt text](http://www.devhumor.com/content/uploads/images/August2017/java-javascript.jpg)
  4. ## Server dependencies
  5. ````
  6. npm init -y
  7. npm install --save express morgan
  8. npm install socket.io --save
  9. npm install mysql --save
  10. npm install sanitizer --save
  11. npm install google-trends-api --save
  12. npm install promise --save
  13. npm install async --save
  14. npm install --save-dev babel-cli babel-preset-es2015 rimraf
  15. ````
  16. ###Configure Babel
  17. ```
  18. touch .babelrc
  19. ```
  20. In that file put:
  21. ````
  22. {
  23. "presets": ["es2015"]
  24. }
  25. ````
  26. ##Database Construction
  27. ````
  28. create database googleTrends;
  29. use googleTrends;
  30. create table users(
  31. user_id mediumint unsigned not null AUTO_INCREMENT,
  32. name varchar(30) not null,
  33. primary key(user_id)
  34. );
  35. create table data(
  36. data_id mediumint unsigned not null AUTO_INCREMENT,
  37. user_id mediumint unsigned not null,
  38. word varchar(100) not null,
  39. score mediumint not null,
  40. primary key(data_id)
  41. );
  42. grant all on googleTrends.* to trendingUser@localhost identified by "password";
  43. ````
  44. ## Socket IO events for server
  45. ````
  46. ````