Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyiViewServer
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
yuyiViewServer
Commits
3382d135
Commit
3382d135
authored
Jan 15, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
ad1378f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
.gitignore
.gitignore
+2
-0
http_server.ts
src/net/http_server.ts
+1
-0
router.ts
src/routers/router.ts
+10
-9
No files found.
.gitignore
View file @
3382d135
...
...
@@ -3,5 +3,6 @@
/out
/node_modules
/test
/public
*test*
*.log
\ No newline at end of file
src/net/http_server.ts
View file @
3382d135
...
...
@@ -33,6 +33,7 @@ export class httpServer {
routers
.
setRouter
(
httpServer
);
const
root
=
path
.
join
(
__dirname
,
"../../public/"
)
httpServer
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
"../../img/"
))
);
httpServer
.
use
(
express
.
static
(
root
))
httpServer
.
use
(
fallback
(
'index.html'
,
{
root
}))
console
.
log
(
'web listen on port:'
+
port
);
...
...
src/routers/router.ts
View file @
3382d135
...
...
@@ -13,24 +13,24 @@ export function setRouter(httpServer){
//======post
httpServer
.
post
(
'/qyszhx'
,
asyncHandler
(
wmkqyszhxBiz
.
getData
));
httpServer
.
post
(
'/
yuyi/viewserver/
qyszhx'
,
asyncHandler
(
wmkqyszhxBiz
.
getData
));
httpServer
.
post
(
'/jxgljsc'
,
asyncHandler
(
jxgljscBiz
.
getData
));
httpServer
.
post
(
'/
yuyi/viewserver/
jxgljsc'
,
asyncHandler
(
jxgljscBiz
.
getData
));
httpServer
.
post
(
'/qyfw'
,
asyncHandler
(
qyfwBiz
.
getData
));
httpServer
.
post
(
'/
yuyi/viewserver/
qyfw'
,
asyncHandler
(
qyfwBiz
.
getData
));
httpServer
.
post
(
'/zhyy'
,
asyncHandler
(
zhyyBiz
.
getData
));
httpServer
.
post
(
'/
yuyi/viewserver/
zhyy'
,
asyncHandler
(
zhyyBiz
.
getData
));
//======get
httpServer
.
get
(
'/qyszhx'
,
asyncHandler
(
wmkqyszhxBiz
.
getData
));
6
httpServer
.
get
(
'/
yuyi/viewserver/
qyszhx'
,
asyncHandler
(
wmkqyszhxBiz
.
getData
));
httpServer
.
get
(
'/jxgljsc'
,
asyncHandler
(
jxgljscBiz
.
getData
));
httpServer
.
get
(
'/
yuyi/viewserver/
jxgljsc'
,
asyncHandler
(
jxgljscBiz
.
getData
));
httpServer
.
get
(
'/qyfw'
,
asyncHandler
(
qyfwBiz
.
getData
));
httpServer
.
get
(
'/
yuyi/viewserver/
qyfw'
,
asyncHandler
(
qyfwBiz
.
getData
));
httpServer
.
get
(
'/zhyy'
,
asyncHandler
(
zhyyBiz
.
getData
));
httpServer
.
get
(
'/
yuyi/viewserver/
zhyy'
,
asyncHandler
(
zhyyBiz
.
getData
));
}
\ No newline at end of file
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