Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
motorCity
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
motorCity
Commits
92bcc9f2
Commit
92bcc9f2
authored
Aug 17, 2022
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
b663fdc7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
serverConfig.xml
serverConfig.xml
+1
-0
serverConfig.ts
src/config/serverConfig.ts
+5
-1
No files found.
serverConfig.xml
View file @
92bcc9f2
...
...
@@ -13,4 +13,5 @@
<broken>
3
</broken>
<token>
09a98bc555474e058ef90b6cc6e23638
</token>
</mapView>
<sockentPort>
30002
</sockentPort>
</config>
src/config/serverConfig.ts
View file @
92bcc9f2
...
...
@@ -3,10 +3,11 @@ import * as fs from "fs";
import
{
BizError
}
from
"../util/bizError"
;
import
{
analysisXml
}
from
"../util/myXML"
;
export
let
port
=
Number
(
process
.
env
.
PORT
)
||
Number
(
process
.
argv
[
3
])
||
3000
1
;
//如果xml里面没有配置 就会使用到这里的端口
export
let
port
=
Number
(
process
.
env
.
PORT
)
||
Number
(
process
.
argv
[
3
])
||
3000
3
;
//如果xml里面没有配置 就会使用到这里的端口 30001
export
let
cloudResource
=
"http://10.51.50.140:8080/api/static/PrivateCloudUsageStatics"
;
export
let
physicalResource
=
"http://10.51.50.140:8080/api/v1/PrivateCloudCurrentUsages"
;
export
let
mapPort
=
"http://10.51.48.213/nlink/v2/getAllDevicesInfo?prjid=0255e1f7515348cc87c7bb2cc6341fer&online=3&broken=3&token=09a98bc555474e058ef90b6cc6e23638"
;
export
let
sockentPort
=
30002
;
export
let
dbConfig
;
export
let
appConfig
;
...
...
@@ -33,6 +34,9 @@ export async function initConfig() {
let
broken
=
mapView
.
broken
[
0
];
let
token
=
mapView
.
token
[
0
];
mapPort
=
mapView
.
mapPort
[
0
]
+
"&online="
+
online
+
"&broken="
+
broken
+
"&token="
+
token
||
mapPort
;
//sockent端口
sockentPort
=
config
.
sockentPort
[
0
]
||
sockentPort
;
}
console
.
log
(
"config init success"
);
...
...
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