Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박선진
/
video-emergency-detection
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
3
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박선진
2020-06-21 16:32:46 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f6a5bbf3c6a8500dd4bcf32422d0b09658d42988
f6a5bbf3
1 parent
b2e6b2b8
Back-end/ 라우터, 서버 js 분리
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
Back-end/apiRouter.js
Back-end/server.js
Back-end/apiRouter.js
0 → 100644
View file @
f6a5bbf
const
express
=
require
(
'express'
);
const
router
=
express
.
Router
();
router
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
send
({
greeting
:
'Hello React x Node.js'
});
});
module
.
exports
=
router
;
\ No newline at end of file
Back-end/server.js
0 → 100644
View file @
f6a5bbf
const
express
=
require
(
'express'
);
const
app
=
express
();
const
api
=
require
(
'./apiRouter'
);
app
.
use
(
'/api'
,
api
);
const
port
=
3002
;
app
.
listen
(
port
,
()
=>
console
.
log
(
`노드서버 시작 :
${
port
}
`
));
Please
register
or
login
to post a comment