fabotjsontotable
v1.0.7
Published
json 파일을 table 로 변환하여 리턴해 주는 미들웨어
Readme
#fabotjsontotable
사용법
var fabotjsontotable = require('fabotjsontotable');
var data = [{a:1,b:1},{a:2, b:2}];
//만약 파라미터로 ?display=table 과 같이 날리면 테이블 데이터가 날라갑니다.
app.get('http://localhost:3000/api/price/000020?display=table', function(req, res){
res.send(fabotjsontotable(req, data)); //테이블리턴
});
app.get('http://localhost:3000/api/price/000020', function(req, res){
res.send(fabotjsontotable(req, data)); //JSON 리턴
});
