aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-04-12 14:42:03 -0500
committerMark Powers <markppowers0@gmail.com>2020-04-12 14:42:03 -0500
commit7e6648902b262484bc0aac824c3784b1ae4b8591 (patch)
treebc56275222a58228fd714af0dad58c660f004ab7 /src/index.js
parent1bffb064e2414ced5b1924a4f9fbd822a09c718e (diff)
Update games, add scores
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js15
1 files changed, 15 insertions, 0 deletions
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);