Toggle navigation
Toggle navigation
This project
Loading...
Sign in
신원형
/
study-or-enjoy
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
신원형
2022-06-06 19:18:46 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
439a610ecdc47ed22b69069fbadeb2b7c4293f92
439a610e
1 parent
77ef78f7
main
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
Dockerfile
main.js
Dockerfile
0 → 100644
View file @
439a610
FROM
node:latest
LABEL project="OSS Demo image"
LABEL maintainer "."
RUN
apt-get update
WORKDIR
/usr/app
COPY ./ /usr/app
EXPOSE
8110
RUN
npm install
CMD
[ "npm","start" ]
RUN
cd
/usr/app
RUN
ls -a
\ No newline at end of file
main.js
View file @
439a610
...
...
@@ -78,6 +78,15 @@ function filter_date(date, id, pw) {
return
null
}
function
is_good_weather
(
weather_data
)
{
if
(
weather_data
.
id
<
800
)
{
return
false
}
return
true
}
/*
1. 사용자가 아무 메세지나 입력?
...
...
@@ -108,11 +117,14 @@ app.post('/hook', async function (req, res) {
sendText
(
eventObj
.
replyToken
,
filter_result
)
}
(
await
weather
.
get_weather_current
()).
then
(
it
=>
{
const
good_weather
=
(
await
weather
.
get_weather_current
()).
then
(
it
=>
{
return
is_good_weather
(
it
)
})
if
(
!
good_weather
)
{
sendText
(
eventObj
.
replyToken
,
"날씨가 나쁨"
)
}
res
.
sendStatus
(
200
);
});
...
...
Please
register
or
login
to post a comment