From 7e6648902b262484bc0aac824c3784b1ae4b8591 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Sun, 12 Apr 2020 14:42:03 -0500 Subject: Update games, add scores --- src/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index 647bf3e..176d432 100644 --- a/src/index.js +++ b/src/index.js @@ -46,6 +46,20 @@ async function sync(alter, force, callback) { function setUpModels() { const models = { + "scores": database.define('score', { + username: { + type: Sequelize.STRING, + allowNull: false, + }, + score: { + type: Sequelize.INTEGER, + allowNull: false, + }, + game: { + type: Sequelize.STRING, + allowNull: false, + } + }) } return models; } @@ -60,5 +74,6 @@ server.load("./snake/server", models, jwtFunctions, database) server.load("./stacker/server", models, jwtFunctions, database) server.load("./pinball/server", models, jwtFunctions, database) server.load("./math/server", models, jwtFunctions, database) +server.load("./pp/server", models, jwtFunctions, database) server.listen(config.port); -- cgit v1.2.3