곽교린

Separate APIkeys from code to APIs.json

{
"youtubeAPI" : "",//insert your youtube API key.
"papagoClientID" : "", //insert your papago client ID.
"papagoClientSecret":"" //insert your papago client secret.
}
\ No newline at end of file
......@@ -7,7 +7,8 @@ var qs = require('querystring');
var path = require('path');
const {google} = require("googleapis");
const service = google.youtube('v3');
const apiKey = 'AIzaSyCjBrFKnBlGvxsfOD-qJP8nBkdEoqKRHu8'; //api키
const apis = require('./APIs.json');
const apiKey = apis.youtubeAPI; //api키
let videoNum = "TpPwI_Lo0YY"; //비디오 주소(예시)
var videoLang = 'all'; //설정 언어
const serverIP = "http://localhost:3000" //서버의 주소
......
AIzaSyCjBrFKnBlGvxsfOD-qJP8nBkdEoqKRHu8
\ No newline at end of file
var client_id = '6hpmInU0TCrQIiiJwgJX';
var client_secret = 'jpYZbkj0_g';
const apis = require('./APIs.json');
var client_id = apis.papagoClientID;
var client_secret = apis.papagoClientSecret;
// var query = "언어를 감지할 문장을 입력하세요.";
// app.get('/detectLangs', function (req, res) {
// var api_url = 'https://openapi.naver.com/v1/papago/detectLangs';
......