Skip to content

Commit aeac219

Browse files
modified readme
1 parent 0479072 commit aeac219

File tree

2 files changed

+66
-28
lines changed

2 files changed

+66
-28
lines changed

README.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,40 @@
1-
# serverless-lambda-announcer
2-
A plugin for serverless framework that announces a deploy of a new function to a given url.
1+
# serverless-lambda-announcer
2+
A plugin for serverless framework that announces a deploy of a new function to a given url.
3+
4+
## Purpose
5+
This plugin allows to specify a custom hook listening for lambda deploys.
6+
On deploy the announcer will announce the lambda definition to the specified hook. :speech_balloon:
7+
The hook should be a `POST` endpoint accepting json-encoded payload.
8+
## Installation
9+
Run `npm install serverless-lambda-announcer`
10+
Add it to the `serverless.yml` as:
11+
```
12+
plugins:
13+
...
14+
- serverless-lambda-announcer
15+
...
16+
```
17+
## Usage
18+
In the `serverless.yml` specify a custom parameter for the announcer:
19+
```
20+
custom:
21+
- announcer:
22+
hook: <your POST webhook>
23+
```
24+
The body that is sent from the announcer is:
25+
```
26+
[
27+
{
28+
"endpoints": [
29+
{
30+
"method": <http method>,
31+
"path": <full https endpoint>
32+
}
33+
],
34+
"name":"<service name> : <function name>",
35+
"events":[
36+
{<generated cloudformation event data>}
37+
]
38+
}
39+
]
40+
```

package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
{
2-
"name": "serverless-lambda-announcer",
3-
"version": "1.0.0",
4-
"description": "A plugin for serverless framework that announces a deploy of a new function to a given url.",
5-
"main": "index.js",
6-
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
8-
},
9-
"repository": {
10-
"type": "git",
11-
"url": "git+https://github.com/dee-me-tree-or-love/serverless-lambda-announcer.git"
12-
},
13-
"author": "dmitrii",
14-
"license": "ISC",
15-
"bugs": {
16-
"url": "https://github.com/dee-me-tree-or-love/serverless-lambda-announcer/issues"
17-
},
18-
"homepage": "https://github.com/dee-me-tree-or-love/serverless-lambda-announcer#readme",
19-
"dependencies": {
20-
"request": "^2.85.0"
21-
},
22-
"devDependencies": {
23-
"eslint": "^4.19.1",
24-
"eslint-config-google": "^0.9.1"
25-
}
26-
}
1+
{
2+
"name": "serverless-lambda-announcer",
3+
"version": "1.0.1",
4+
"description": "A plugin for serverless framework that announces a deploy of a new function to a given url.",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/dee-me-tree-or-love/serverless-lambda-announcer.git"
12+
},
13+
"author": "dmitrii",
14+
"license": "ISC",
15+
"bugs": {
16+
"url": "https://github.com/dee-me-tree-or-love/serverless-lambda-announcer/issues"
17+
},
18+
"homepage": "https://github.com/dee-me-tree-or-love/serverless-lambda-announcer#readme",
19+
"dependencies": {
20+
"request": "^2.85.0"
21+
},
22+
"devDependencies": {
23+
"eslint": "^4.19.1",
24+
"eslint-config-google": "^0.9.1"
25+
}
26+
}

0 commit comments

Comments
 (0)