Skip to content

Commit 2715882

Browse files
committed
change port
1 parent c8c5132 commit 2715882

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const mysql = require('mysql');
44
const redis = require('redis');
55
const Db = require('mongodb').Db;
66
const Server = require('mongodb').Server;
7-
const PORT = 3000;
87

98
/*-------------------------mysql----------------------------------------*/
109
const mysqlClient = mysql.createConnection({
@@ -26,6 +25,8 @@ async function getMysqlVersion() {
2625
return result;
2726
}
2827

28+
29+
2930
/*-------------------------mongodb---------------------------------------*/
3031
async function getMongoVersion() {
3132
const db = new Db('test', new Server(process.env.MONGO_HOST, 27017));
@@ -76,6 +77,6 @@ app.use(async(ctx) => {
7677
}
7778
});
7879

79-
app.listen(3000, () => {
80-
console.info(`open http://127.0.0.1:${PORT}`);
80+
app.listen(process.env.APP_PORT, () => {
81+
console.info(`open http://127.0.0.1:${process.env.NGINX_PORT}`);
8182
});

0 commit comments

Comments
 (0)