Skip to content
Permalink
Browse files
disabled sqlite
  • Loading branch information
aa7401 committed Jul 19, 2019
1 parent 9ad5d28 commit d9f78cd91f70b3658947fa5aa7bdd0495982762c
Showing 1 changed file with 5 additions and 5 deletions.
@@ -14,7 +14,7 @@ const staticDir = require('koa-static')
const bodyParser = require('koa-bodyparser')
const koaBody = require('koa-body')({multipart: true, uploadDir: '.'})
const session = require('koa-session')
const sqlite = require('sqlite-async')
//const sqlite = require('sqlite-async')
const bcrypt = require('bcrypt-promise')
const fs = require('fs-extra')
const mime = require('mime-types')
@@ -141,8 +141,8 @@ router.get('/logout', async ctx => {
app.use(router.routes())
module.exports = app.listen(port, async() => {
// MAKE SURE WE HAVE A DATABASE WITH THE CORRECT SCHEMA
const db = await sqlite.open('./website.db')
await db.run('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT, user TEXT, pass TEXT);')
await db.close()
//const db = await sqlite.open('./website.db')
//await db.run('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT, user TEXT, pass TEXT);')
//await db.close()
console.log(`listening on port ${port}`)
})
})

0 comments on commit d9f78cd

Please sign in to comment.