Ubuntu

config aws and correct config files

......@@ -39,8 +39,7 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
keys/api_option.js
keys/db_option.js
lib/keys/*
# TypeScript v1 declaration files
typings/
......

23.9 KB

const mysql = require('mysql');
const DB_option = require('../keys/db_option');
const DB_option = require('./keys/db_option');
module.exports = mysql.createConnection(DB_option);
......
const db = require('./db.js');
const secret_key = require('../keys/api_option').key;
const secret_key = require('./keys/api_option').key;
const requesting = require('request');
const lat = "37.239795";
const lon = "127.083240";
......@@ -28,7 +28,7 @@ module.exports = (server, app) => {
return new Promise((resolve, reject) => {
requesting.get({
// api를 요청할 주소 -- 시크릿키,위도,경도 입력
url: `https://api2.sktelecom.com/weather/${when}/${what}?appKey=${secret_key}&lat=${lat}&lon=${lon}`,
url: `https://api2.sktelecom.com/weather/${when}/${what}?lat=${lat}&lon=${lon}&appKey=${secret_key}`,
json: true
},
//api에게 응답 받았을때 실행되는 callback function
......
This diff is collapsed. Click to expand it.
No preview for this file type