Skip to content
Permalink
fa85284f92
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
31 lines (25 sloc) 585 Bytes
'use strict'
//const bcrypt = require('bcrypt-promise')
//const fs = require('fs-extra')
//const mime = require('mime-types')
const sqlite = require('sqlite-async')
//const saltRounds = 10
//const Forum = require('./forum.js')
module.exports = class Home {
constructor(dbName = ':memory:') {
return (async() => {
this.db = await sqlite.open(dbName)
return true
})()
}
/** moved to forum.js file **/
/**async getForums() {
try {
const sql = 'SELECT * FROM forums'
const data = await this.db.all(sql)
return data
} catch (err) {
throw err
}
}**/
}