diff options
author | Akshay" (aider) <[email protected]> | 2024-11-08 22:40:42 +0000 |
---|---|---|
committer | Akshay" (aider) <[email protected]> | 2024-11-08 22:40:42 +0000 |
commit | 6c6c9a6cf021cee7877a96d34a953d2885ef8a42 (patch) | |
tree | c8dc7dd9b8aa69fd11ed0ca8b377d9c4cb1e288c /src/index.js | |
parent | 105b68e6a2df38cd47d7f9a5f07248e56bc2dc8a (diff) |
feat: Export and import db instance in index.js and routes/index.js
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 2 |
1 files changed, 2 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}`); |