이재용

결과값을 res.json 해주는 코드 추가

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
......