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:48:50 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0c81277c465d9754cfe96f488acdf8db29e5fc79
0c81277c
1 parent
570befb2
Init Slack Webhook
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
200 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 @
0c81277
...
...
@@ -198,6 +198,22 @@
"integrity"
:
"sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ=="
,
"dev"
:
true
},
"agent-base"
:
{
"version"
:
"2.1.1"
,
"resolved"
:
"https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz"
,
"integrity"
:
"sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc="
,
"requires"
:
{
"extend"
:
"~3.0.0"
,
"semver"
:
"~5.0.1"
},
"dependencies"
:
{
"semver"
:
{
"version"
:
"5.0.3"
,
"resolved"
:
"https://registry.npmjs.org/semver/-/semver-5.0.3.tgz"
,
"integrity"
:
"sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no="
}
}
},
"ajv"
:
{
"version"
:
"6.12.2"
,
"resolved"
:
"https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz"
,
...
...
@@ -341,6 +357,11 @@
"integrity"
:
"sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg=="
,
"dev"
:
true
},
"async"
:
{
"version"
:
"1.5.2"
,
"resolved"
:
"https://registry.npmjs.org/async/-/async-1.5.2.tgz"
,
"integrity"
:
"sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
},
"asynckit"
:
{
"version"
:
"0.4.0"
,
"resolved"
:
"https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"
,
...
...
@@ -710,6 +731,11 @@
"integrity"
:
"sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
,
"dev"
:
true
},
"colors"
:
{
"version"
:
"1.0.3"
,
"resolved"
:
"https://registry.npmjs.org/colors/-/colors-1.0.3.tgz"
,
"integrity"
:
"sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs="
},
"combined-stream"
:
{
"version"
:
"1.0.8"
,
"resolved"
:
"https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz"
,
...
...
@@ -800,6 +826,15 @@
"resolved"
:
"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
,
"integrity"
:
"sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cron-parser"
:
{
"version"
:
"2.15.0"
,
"resolved"
:
"https://registry.npmjs.org/cron-parser/-/cron-parser-2.15.0.tgz"
,
"integrity"
:
"sha512-rMFkrQw8+oG5OuwjiXesup4KeIlEG/IU82YtG4xyAHbO5jhKmYaHPp/ZNhq9+7TjSJ65E3zV3kQPUbmXSff2/g=="
,
"requires"
:
{
"is-nan"
:
"^1.3.0"
,
"moment-timezone"
:
"^0.5.31"
}
},
"cross-spawn"
:
{
"version"
:
"7.0.3"
,
"resolved"
:
"https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz"
,
...
...
@@ -833,6 +868,11 @@
"resolved"
:
"https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz"
,
"integrity"
:
"sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg=="
},
"cycle"
:
{
"version"
:
"1.0.3"
,
"resolved"
:
"https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz"
,
"integrity"
:
"sha1-IegLK+hYD5i0aPN5QwZisEbDStI="
},
"dashdash"
:
{
"version"
:
"1.14.1"
,
"resolved"
:
"https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz"
,
...
...
@@ -887,6 +927,14 @@
"integrity"
:
"sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ=="
,
"dev"
:
true
},
"define-properties"
:
{
"version"
:
"1.1.3"
,
"resolved"
:
"https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz"
,
"integrity"
:
"sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ=="
,
"requires"
:
{
"object-keys"
:
"^1.0.12"
}
},
"delayed-stream"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
,
...
...
@@ -1240,6 +1288,11 @@
"integrity"
:
"sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
,
"dev"
:
true
},
"eventemitter3"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz"
,
"integrity"
:
"sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg="
},
"extend"
:
{
"version"
:
"3.0.2"
,
"resolved"
:
"https://registry.npmjs.org/extend/-/extend-3.0.2.tgz"
,
...
...
@@ -1261,6 +1314,11 @@
"resolved"
:
"https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz"
,
"integrity"
:
"sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"eyes"
:
{
"version"
:
"0.1.8"
,
"resolved"
:
"https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz"
,
"integrity"
:
"sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A="
},
"fast-deep-equal"
:
{
"version"
:
"3.1.3"
,
"resolved"
:
"https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz"
,
...
...
@@ -1638,6 +1696,16 @@
"sshpk"
:
"^1.7.0"
}
},
"https-proxy-agent"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz"
,
"integrity"
:
"sha1-NffabEjOTdv6JkiRrFk+5f+GceY="
,
"requires"
:
{
"agent-base"
:
"2"
,
"debug"
:
"2"
,
"extend"
:
"3"
}
},
"iconv"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/iconv/-/iconv-3.0.0.tgz"
,
...
...
@@ -1794,6 +1862,14 @@
"is-path-inside"
:
"^3.0.1"
}
},
"is-nan"
:
{
"version"
:
"1.3.0"
,
"resolved"
:
"https://registry.npmjs.org/is-nan/-/is-nan-1.3.0.tgz"
,
"integrity"
:
"sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ=="
,
"requires"
:
{
"define-properties"
:
"^1.1.3"
}
},
"is-npm"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz"
,
...
...
@@ -2183,6 +2259,11 @@
"resolved"
:
"https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz"
,
"integrity"
:
"sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
},
"long-timeout"
:
{
"version"
:
"0.1.1"
,
"resolved"
:
"https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz"
,
"integrity"
:
"sha1-lyHXiLR+C8taJMLivuGg2lXatRQ="
},
"lowercase-keys"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz"
,
...
...
@@ -2285,6 +2366,19 @@
"minimist"
:
"^1.2.5"
}
},
"moment"
:
{
"version"
:
"2.27.0"
,
"resolved"
:
"https://registry.npmjs.org/moment/-/moment-2.27.0.tgz"
,
"integrity"
:
"sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ=="
},
"moment-timezone"
:
{
"version"
:
"0.5.31"
,
"resolved"
:
"https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz"
,
"integrity"
:
"sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA=="
,
"requires"
:
{
"moment"
:
">= 2.9.0"
}
},
"mongodb"
:
{
"version"
:
"3.5.8"
,
"resolved"
:
"https://registry.npmjs.org/mongodb/-/mongodb-3.5.8.tgz"
,
...
...
@@ -2436,6 +2530,16 @@
"tar"
:
"^4.4.2"
}
},
"node-schedule"
:
{
"version"
:
"1.3.2"
,
"resolved"
:
"https://registry.npmjs.org/node-schedule/-/node-schedule-1.3.2.tgz"
,
"integrity"
:
"sha512-GIND2pHMHiReSZSvS6dpZcDH7pGPGFfWBIEud6S00Q8zEIzAs9ommdyRK1ZbQt8y1LyZsJYZgPnyi7gpU2lcdw=="
,
"requires"
:
{
"cron-parser"
:
"^2.7.3"
,
"long-timeout"
:
"0.1.1"
,
"sorted-array-functions"
:
"^1.0.0"
}
},
"nodemon"
:
{
"version"
:
"2.0.4"
,
"resolved"
:
"https://registry.npmjs.org/nodemon/-/nodemon-2.0.4.tgz"
,
...
...
@@ -2543,6 +2647,11 @@
"resolved"
:
"https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz"
,
"integrity"
:
"sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-keys"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz"
,
"integrity"
:
"sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
},
"on-finished"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
,
...
...
@@ -2592,6 +2701,11 @@
"word-wrap"
:
"^1.2.3"
}
},
"options"
:
{
"version"
:
"0.0.6"
,
"resolved"
:
"https://registry.npmjs.org/options/-/options-0.0.6.tgz"
,
"integrity"
:
"sha1-7CLTEoBrtT5zF3Pnza788cZDEo8="
},
"os-homedir"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz"
,
...
...
@@ -2940,6 +3054,11 @@
"signal-exit"
:
"^3.0.2"
}
},
"retry"
:
{
"version"
:
"0.8.0"
,
"resolved"
:
"https://registry.npmjs.org/retry/-/retry-0.8.0.tgz"
,
"integrity"
:
"sha1-I2dijcDtskex6rZJ3FOshiisLV8="
},
"rimraf"
:
{
"version"
:
"2.7.1"
,
"resolved"
:
"https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz"
,
...
...
@@ -3044,6 +3163,30 @@
"resolved"
:
"https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz"
,
"integrity"
:
"sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
},
"slack-client"
:
{
"version"
:
"2.0.6"
,
"resolved"
:
"https://registry.npmjs.org/slack-client/-/slack-client-2.0.6.tgz"
,
"integrity"
:
"sha1-eOuJ9/UnYg4UXM17HY0WvWcLs4M="
,
"requires"
:
{
"async"
:
"^1.5.0"
,
"eventemitter3"
:
"^1.1.1"
,
"https-proxy-agent"
:
"^1.0.0"
,
"inherits"
:
"^2.0.1"
,
"lodash"
:
"^3.10.1"
,
"request"
:
"^2.64.0"
,
"retry"
:
"^0.8.0"
,
"url-join"
:
"0.0.1"
,
"winston"
:
"^2.1.1"
,
"ws"
:
"^1.0.1"
},
"dependencies"
:
{
"lodash"
:
{
"version"
:
"3.10.1"
,
"resolved"
:
"https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz"
,
"integrity"
:
"sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y="
}
}
},
"slack-node"
:
{
"version"
:
"0.1.8"
,
"resolved"
:
"https://registry.npmjs.org/slack-node/-/slack-node-0.1.8.tgz"
,
...
...
@@ -3076,6 +3219,11 @@
"resolved"
:
"https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz"
,
"integrity"
:
"sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"sorted-array-functions"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.2.0.tgz"
,
"integrity"
:
"sha512-sWpjPhIZJtqO77GN+LD8dDsDKcWZ9GCOJNqKzi1tvtjGIzwfoyuRH8S0psunmc6Z5P+qfDqztSbwYR5X/e1UTg=="
},
"source-map"
:
{
"version"
:
"0.5.7"
,
"resolved"
:
"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz"
,
...
...
@@ -3113,6 +3261,11 @@
"tweetnacl"
:
"~0.14.0"
}
},
"stack-trace"
:
{
"version"
:
"0.0.10"
,
"resolved"
:
"https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz"
,
"integrity"
:
"sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA="
},
"statuses"
:
{
"version"
:
"1.5.0"
,
"resolved"
:
"https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz"
,
...
...
@@ -3382,6 +3535,11 @@
"is-typedarray"
:
"^1.0.0"
}
},
"ultron"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz"
,
"integrity"
:
"sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po="
},
"undefsafe"
:
{
"version"
:
"2.0.3"
,
"resolved"
:
"https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz"
,
...
...
@@ -3434,6 +3592,11 @@
"punycode"
:
"^2.1.0"
}
},
"url-join"
:
{
"version"
:
"0.0.1"
,
"resolved"
:
"https://registry.npmjs.org/url-join/-/url-join-0.0.1.tgz"
,
"integrity"
:
"sha1-HbSK1CLTQCRpqH99l73r/k+x48g="
},
"url-parse-lax"
:
{
"version"
:
"3.0.0"
,
"resolved"
:
"https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz"
,
...
...
@@ -3554,6 +3717,26 @@
"string-width"
:
"^4.0.0"
}
},
"winston"
:
{
"version"
:
"2.4.5"
,
"resolved"
:
"https://registry.npmjs.org/winston/-/winston-2.4.5.tgz"
,
"integrity"
:
"sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A=="
,
"requires"
:
{
"async"
:
"~1.0.0"
,
"colors"
:
"1.0.x"
,
"cycle"
:
"1.0.x"
,
"eyes"
:
"0.1.x"
,
"isstream"
:
"0.1.x"
,
"stack-trace"
:
"0.0.x"
},
"dependencies"
:
{
"async"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/async/-/async-1.0.0.tgz"
,
"integrity"
:
"sha1-+PwEyjoTeErenhZBr5hXjPvWR6k="
}
}
},
"word-wrap"
:
{
"version"
:
"1.2.3"
,
"resolved"
:
"https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz"
,
...
...
@@ -3586,6 +3769,15 @@
"typedarray-to-buffer"
:
"^3.1.5"
}
},
"ws"
:
{
"version"
:
"1.1.5"
,
"resolved"
:
"https://registry.npmjs.org/ws/-/ws-1.1.5.tgz"
,
"integrity"
:
"sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w=="
,
"requires"
:
{
"options"
:
">=0.0.5"
,
"ultron"
:
"1.0.x"
}
},
"xdg-basedir"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz"
,
...
...
jaksimsamil-server/package.json
View file @
0c81277
...
...
@@ -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 @
0c81277
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