Skip to content

Commit

Permalink
Add basic usage example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
expelledboy committed Feb 26, 2020
1 parent 7a226b6 commit 03755ae
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ RUN apk add --no-cache make nodejs npm

WORKDIR /root
COPY package*.json ./
RUN npm install
RUN npm set progress=false && npm config set depth 0
RUN npm install --only=production

COPY src /root/src
EXPOSE 3000
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Makefile Hook

Webhooks for your project made simple. Most projects have a Makefile, why not
just expose an API to run them?

```
echo 'test:\n\texit 0' > Makefile
docker run -d --rm \
-v $(PWD):/webhook \
-p 3000:3000 \
--name make-webhook \
expelledboy/make-webhook
curl http://localhost:3000/test
# Cleanup
docker stop make-webhook
```


3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "make-webhook",
"version": "1.0.1",
"description": "Run make targets through webhooks",
"main": "src/server.js",
"repository": "https://github.com/expelledboy/make-webhook",
"author": "expelledboy",
"license": "Apache-2.0",
"main": "src/server.js",
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.0.0",
Expand Down

0 comments on commit 03755ae

Please sign in to comment.