File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ const mysql = require('mysql');
44const redis = require ( 'redis' ) ;
55const Db = require ( 'mongodb' ) . Db ;
66const Server = require ( 'mongodb' ) . Server ;
7- const PORT = 3000 ;
87
98/*-------------------------mysql----------------------------------------*/
109const mysqlClient = mysql . createConnection ( {
@@ -26,6 +25,8 @@ async function getMysqlVersion() {
2625 return result ;
2726}
2827
28+
29+
2930/*-------------------------mongodb---------------------------------------*/
3031async 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} ) ;
You can’t perform that action at this time.
0 commit comments