diff options
-rw-r--r-- | src/index.js | 2 | ||||
-rw-r--r-- | src/routes/index.js | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js index ea2fea1..ae9d87b 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -33,6 +33,8 @@ db.run(` | |||
33 | ) | 33 | ) |
34 | `); | 34 | `); |
35 | 35 | ||
36 | module.exports = { db }; | ||
37 | |||
36 | const port = process.env.READIT_PORT; | 38 | const port = process.env.READIT_PORT; |
37 | const server = app.listen(port ? port : 3000, () => { | 39 | const server = app.listen(port ? port : 3000, () => { |
38 | console.log(`started on ${server.address().port}`); | 40 | console.log(`started on ${server.address().port}`); |
diff --git a/src/routes/index.js b/src/routes/index.js index c29933e..93ebf46 100644 --- a/src/routes/index.js +++ b/src/routes/index.js | |||
@@ -2,6 +2,7 @@ const express = require("express"); | |||
2 | const he = require("he"); | 2 | const he = require("he"); |
3 | const router = express.Router(); | 3 | const router = express.Router(); |
4 | const geddit = require("../geddit.js"); | 4 | const geddit = require("../geddit.js"); |
5 | const { db } = require("../index"); | ||
5 | const G = new geddit.Geddit(); | 6 | const G = new geddit.Geddit(); |
6 | 7 | ||
7 | // GET / | 8 | // GET / |