반응형
mainRouter.js
5줄에
res.send({"Key": "Value"});
로 변경 하면
const express = require('express');
const router = express.Router();
router.get("/", function(req, res) {
res.send({"Key": "Value"});
})
router.get("/about", function(req, res) {
res.send('About Page!')
})
module.exports = router
텍스트로 표시되는데
https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh?hl=ko
설치하면
JSON Viewer
The most beautiful and customizable JSON/JSONP highlighter that your eyes have ever seen. Open source at https://goo.gl/fmphc7
chrome.google.com
표시된다.
반응형
'Node.Js' 카테고리의 다른 글
[Node.js] post 방식으로 값 확인 postman 설치 (0) | 2023.01.14 |
---|---|
[Node.js] query (0) | 2023.01.14 |
[Node.js] mainRouter.js (0) | 2023.01.14 |
[Node.js] 보안 관련 helmet 설치 (0) | 2023.01.14 |
[Node.js] mac에서 supervisor 설치 시, command not found 에러 (0) | 2023.01.14 |