Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이재용
/
TFT_My_Galaxy
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
이재용
2020-06-28 22:52:58 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f6a2156634bec26cb38516572064685441f3a062
f6a21566
1 parent
4cc00e70
결과값을 res.json 해주는 코드 추가
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
TFT_My_Galaxy/router/main.js
TFT_My_Galaxy/router/main.js
View file @
f6a2156
var
user
=
require
(
"../user/userinfo"
)
var
express
=
require
(
'express'
);
const
search
=
require
(
"../api/api"
);
var
app
=
express
.
Router
();
app
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
render
(
'main'
,
{
title
:
'R U TROLL?'
});
});
app
.
get
(
'/search/:username/'
,
function
(
req
,
res
){
var
name
=
req
.
params
.
username
user
.
userInfo
(
name
)
app
.
get
(
'/api/search/:username/'
,
function
(
req
,
res
){
var
name
=
req
.
params
.
username
;
user
.
userInfo
(
name
,
function
(
result
){
console
.
log
(
result
);
res
.
json
(
result
);
});
});
module
.
exports
=
app
;
\ No newline at end of file
...
...
Please
register
or
login
to post a comment