Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오윤석
/
maplespec.ga
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
4
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
오윤석
2020-05-31 21:20:00 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
16959c581012f527dbe5fe1915544f21d7c516b1
16959c58
1 parent
a9fae0f9
nodejs api router 추가
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
app/node/app.js
app/node/routes/home.js
app/node/routes/index.js
app/node/app.js
View file @
16959c5
var
express
=
require
(
'express'
);
var
app
=
express
();
var
bodyParser
=
require
(
'body-parser'
);
let
express
=
require
(
'express'
);
let
app
=
express
();
let
bodyParser
=
require
(
'body-parser'
);
let
routes
=
require
(
'./routes'
);
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}));
app
.
use
(
bodyParser
.
json
());
var
server
=
app
.
listen
(
80
);
\ No newline at end of file
app
.
get
(
'/api/home'
,
routes
.
home
);
let
server
=
app
.
listen
(
80
);
\ No newline at end of file
...
...
app/node/routes/home.js
0 → 100644
View file @
16959c5
module
.
exports
=
function
(
req
,
res
)
{
res
.
send
(
'this is home'
);
}
\ No newline at end of file
app/node/routes/index.js
0 → 100644
View file @
16959c5
let
routes
=
{};
routes
.
home
=
require
(
'./home'
);
module
.
exports
=
routes
;
\ No newline at end of file
Please
register
or
login
to post a comment