Moved contents of seasoned_api up to root folder
This commit is contained in:
13
src/database/database.js
Normal file
13
src/database/database.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const configuration = require("../config/configuration").getInstance();
|
||||
const SqliteDatabase = require("./sqliteDatabase");
|
||||
|
||||
const database = new SqliteDatabase(configuration.get("database", "host"));
|
||||
/**
|
||||
* This module establishes a connection to the database
|
||||
* specified in the confgiuration file. It tries to setup
|
||||
* the required tables after successfully connecting.
|
||||
* If the tables already exists, it simply proceeds.
|
||||
*/
|
||||
Promise.resolve().then(() => database.setUp());
|
||||
|
||||
module.exports = database;
|
||||
Reference in New Issue
Block a user