Gitlab@Informatics
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
git-deploy-kpi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
65160029
git-deploy-kpi
Commits
b1cb7f58
Commit
b1cb7f58
authored
1 month ago
by
65160029
Browse files
Options
Downloads
Patches
Plain Diff
Update 2 files
- /lib/db.js - /app.js
parent
b0bdacc1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.js
+1
-1
1 addition, 1 deletion
app.js
lib/db.js
+3
-3
3 additions, 3 deletions
lib/db.js
with
4 additions
and
4 deletions
app.js
+
1
−
1
View file @
b1cb7f58
...
...
@@ -11,7 +11,7 @@ const cookieParser = require("cookie-parser");
const
logger
=
require
(
"
morgan
"
);
const
flash
=
require
(
"
express-flash
"
);
const
connection
=
require
(
"
./lib/db
"
);
const
db
=
require
(
"
./lib/db
"
);
const
indexRouter
=
require
(
"
./routes/index
"
);
const
usersRouter
=
require
(
"
./routes/users
"
);
...
...
This diff is collapsed.
Click to expand it.
lib/db.js
+
3
−
3
View file @
b1cb7f58
var
mysql
=
require
(
"
mysql
"
);
var
connection
=
mysql
.
createConnection
({
var
db
=
mysql
.
createConnection
({
host
:
process
.
env
.
DB_HOST
,
user
:
process
.
env
.
DB_USER
,
password
:
process
.
env
.
DB_PASS
,
database
:
process
.
env
.
DB_NAME
});
connection
.
connect
((
error
)
=>
{
db
.
connect
((
error
)
=>
{
if
(
!!
error
)
{
console
.
log
(
error
);
}
else
{
...
...
@@ -14,4 +14,4 @@ connection.connect((error) => {
}
});
module
.
exports
=
connection
;
module
.
exports
=
db
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment