|
|
|
|
@ -358,7 +358,7 @@ Set up a database connection in `models/db.js`
|
|
|
|
|
```javascript
|
|
|
|
|
var Sequelize = require('sequelize'); //require sequelize package
|
|
|
|
|
|
|
|
|
|
var DB_URL = process.env.DATABASE_URL || 'postgres://matthuntington@localhost:5432/sedstack'; //use either environment variable or static url
|
|
|
|
|
var DB_URL = process.env.DATABASE_URL || 'postgres://matthuntington:password@localhost:5432/sedstack'; //use either environment variable or static url
|
|
|
|
|
|
|
|
|
|
var db = new Sequelize(DB_URL); //create the connection. Will not run multiple times, due to require cacheing the file
|
|
|
|
|
|
|
|
|
|
|