Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Dui123
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
王天宇
Dui123
Commits
67206646
Commit
67206646
authored
Oct 20, 2021
by
wty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开启服务
parent
92d4b73a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
app.js
server/app.js
+18
-18
No files found.
server/app.js
View file @
67206646
...
...
@@ -15,8 +15,8 @@ const typeManage = require('./routes/typeManage')
const
engines
=
require
(
'consolidate'
)
const
app
=
express
();
//
global.domain = 'http://dui123.dui88dev.com:3000'
global
.
domain
=
'http://127.0.0.1:3001'
global
.
domain
=
'http://dui123.dui88dev.com:3000'
//
global.domain = 'http://127.0.0.1:3001'
const
Eureka
=
require
(
'eureka-node'
).
default
const
DockerApp
=
require
(
'docker-app-node'
)
...
...
@@ -28,22 +28,22 @@ const pkg = require('./package.json')
// 获取配置的端口号
const
port
=
3000
//
const dockerApp = new DockerApp({
//
app,
//
appType: 'express',
//
port
//
})
//
//
//
注册Eureka
//
global.eureka = new Eureka({
//
port, // 应用端口号
//
appName: pkg.name, // 应用名称
//
services: ['KJY-WEB'] // 依赖服务名
//
})
//
//
global.eureka.start().then(() => {
//
dockerApp.startServer()
//
})
const
dockerApp
=
new
DockerApp
({
app
,
appType
:
'express'
,
port
})
// 注册Eureka
global
.
eureka
=
new
Eureka
({
port
,
// 应用端口号
appName
:
pkg
.
name
,
// 应用名称
services
:
[
'KJY-WEB'
]
// 依赖服务名
})
global
.
eureka
.
start
().
then
(()
=>
{
dockerApp
.
startServer
()
})
//
...
...
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