Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Luc Bourdot
codimd
Commits
acaeef17
Commit
acaeef17
authored
Dec 22, 2016
by
bananaappletw
Browse files
Fix #293
parent
8153fa32
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/models/index.js
View file @
acaeef17
...
...
@@ -13,10 +13,11 @@ var dbconfig = config.db;
dbconfig
.
logging
=
config
.
debug
?
logger
.
info
:
false
;
var
sequelize
=
null
;
if
(
dbconfig
.
hasOwnProperty
(
'
username
'
)
||
dbconfig
.
hasOwnProperty
(
'
password
'
))
sequelize
=
new
Sequelize
(
dbconfig
.
database
,
dbconfig
.
username
,
dbconfig
.
password
,
dbconfig
);
if
(
process
.
env
.
DATABASE_URL
)
sequelize
=
new
Sequelize
(
process
.
env
.
DATABASE_URL
,
dbconfig
.
username
,
dbconfig
.
password
,
dbconfig
);
else
sequelize
=
new
Sequelize
(
dbconfig
.
database
,
dbconfig
);
sequelize
=
new
Sequelize
(
dbconfig
.
database
,
dbconfig
.
username
,
dbconfig
.
password
,
dbconfig
);
var
db
=
{};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment