Ubuntu

setting aws and correct config

......@@ -39,8 +39,8 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
keys/api_option.js
keys/db_option.js
keys/api_option
keys/db_option
# TypeScript v1 declaration files
typings/
......@@ -78,4 +78,4 @@ typings/
.serverless
# End of https://www.gitignore.io/api/node
\ No newline at end of file
# End of https://www.gitignore.io/api/node
......
const mysql = require('mysql');
const DB_option = require('../keys/db_option');
const DB_option = require('./keys/db_option');
module.exports = mysql.createConnection(DB_option);
......
module.exports = {
key : "9a433f5f-c41c-4f7f-a02e-238a74e3d716"};
module.exports = {
host: 'localhost',
user: 'root',
password: 'rkdud0520',
port: 3306,
database: 'weather'
};
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.