Skip to content

Commit

Permalink
#54 json 데이터 파싱
Browse files Browse the repository at this point in the history
  • Loading branch information
alreadynyeong committed Jan 22, 2022
1 parent f43a70c commit b8bdd58
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions routes/mbtiRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ const mbti_test = require('../template/mbti_test.js');
const mbti_result = require('../template/mbti_result.js');
// var db = require('../config/db'); // db.js 폴더 경로

const fs = require('fs');

const qfile = fs.readFileSync('./config/question.json', 'utf8');
const rfile = fs.readFileSync('./config/result.json', 'utf8');

const qData = JSON.parse(qfile);
const rData = JSON.parse(rfile);

console.log(qData);
console.log(rData);



router.get('/', function(request, response){

Expand Down

0 comments on commit b8bdd58

Please sign in to comment.