db.js 336 B

1234567
  1. "use strict";
  2. exports.__esModule = true;
  3. var Sequelize = require('sequelize');
  4. var pkg = require('../../package.json');
  5. var dbName = pkg.name + (process.env.NODE_ENV === 'test' ? '-test' : '');
  6. var dbUrl = process.env.DATABASE_URL || "postgres://localhost:5432/" + dbName;
  7. exports["default"] = new Sequelize(dbUrl, { logging: false });