Toggle navigation
Toggle navigation
This project
Loading...
Sign in
정나리
/
Jaksimsamil
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
송용우
2020-06-23 13:49:04 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
14b0e21bbdc96ae98b251161c7b7408dc5ae5edd
14b0e21b
2 parents
570befb2
0c81277c
Merge commit '
0c81277c
' into develop
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
jaksimsamil-server/package-lock.json
jaksimsamil-server/package.json
jaksimsamil-page/src/lib/util/sendSlack.js → jaksimsamil-server/src/util/sendSlack.js
jaksimsamil-server/package-lock.json
View file @
14b0e21
This diff is collapsed. Click to expand it.
jaksimsamil-server/package.json
View file @
14b0e21
...
...
@@ -21,7 +21,9 @@
"koa-router"
:
"^9.0.1"
,
"mongoose"
:
"^5.9.17"
,
"morgan"
:
"^1.10.0"
,
"node-schedule"
:
"^1.3.2"
,
"path"
:
"^0.12.7"
,
"slack-client"
:
"^2.0.6"
,
"slack-node"
:
"^0.1.8"
,
"voca"
:
"^1.4.0"
},
...
...
jaksimsamil-
page/src/lib
/util/sendSlack.js
→
jaksimsamil-
server/src
/util/sendSlack.js
View file @
14b0e21
const
Slack
=
require
(
"slack-node"
);
// 슬랙 모듈 사용
const
webhookUri
=
'https://hooks.slack.com/services/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'
;
"https://hooks.slack.com/services/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"
;
// Webhook URL
const
slack
=
new
Slack
();
slack
.
setWebhook
(
webhookUri
);
const
send
=
async
(
message
)
=>
{
slack
.
webhook
(
{
channel
:
'#general'
,
// 전송될 슬랙 채널
username
:
'webhookbot'
,
//슬랙에 표시될 이름
text
:
message
,
},
function
(
err
,
response
)
{
console
.
log
(
response
);
}
,
}
);
};
send
(
'안녕'
);
send
(
"hello"
);
...
...
Please
register
or
login
to post a comment