Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2019-1-OpenSourceSW
/
Probability Death
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Ubuntu
2019-05-21 14:20:10 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5ad9a55d80f75735ba3a49d7e2c95ef4a8b74204
5ad9a55d
1 parent
ec58beff
setting aws and correct config
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
6 deletions
.gitignore
lib/db.js
lib/keys/api_option
lib/keys/db_option
lib/socketio.js
package-lock.json
.gitignore
View file @
5ad9a55
...
...
@@ -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
...
...
lib/db.js
View file @
5ad9a55
const
mysql
=
require
(
'mysql'
);
const
DB_option
=
require
(
'.
.
/keys/db_option'
);
const
DB_option
=
require
(
'./keys/db_option'
);
module
.
exports
=
mysql
.
createConnection
(
DB_option
);
...
...
lib/keys/api_option
0 → 100644
View file @
5ad9a55
module.exports = {
key : "9a433f5f-c41c-4f7f-a02e-238a74e3d716"};
lib/keys/db_option
0 → 100644
View file @
5ad9a55
module.exports = {
host: 'localhost',
user: 'root',
password: 'rkdud0520',
port: 3306,
database: 'weather'
};
lib/socketio.js
View file @
5ad9a55
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
...
...
package-lock.json
View file @
5ad9a55
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment