Ubuntu

config aws and correct config files

...@@ -39,8 +39,7 @@ build/Release ...@@ -39,8 +39,7 @@ build/Release
39 # Dependency directories 39 # Dependency directories
40 node_modules/ 40 node_modules/
41 jspm_packages/ 41 jspm_packages/
42 -keys/api_option.js 42 +lib/keys/*
43 -keys/db_option.js
44 # TypeScript v1 declaration files 43 # TypeScript v1 declaration files
45 typings/ 44 typings/
46 45
......

23.9 KB

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