Simplifying database connection options

This commit is contained in:
JayWll 2020-04-11 12:29:56 -06:00
parent fcc89e75e6
commit 555ae80afc

View File

@ -2,20 +2,11 @@
const express = require('express');
const Sequelize = require('sequelize');
const Op = Sequelize.Op
//const request = require('request'); // TEMPORARY! Used for import function.
const app = express();
// Setup database, using credentials set in .env
var sequelize = new Sequelize('database', process.env.DB_USER, process.env.DB_PASS, {
host: '0.0.0.0',
dialect: 'sqlite',
pool: {
max: 5,
min: 0,
idle: 10000
},
// Security note: the database is saved to the file `database.sqlite` on the local filesystem. It's deliberately placed in the `.data` directory
// which doesn't get copied if someone remixes the project.
storage: '.data/database.sqlite'
});
var Readings;