-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 218ff27
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# OS X | ||
.DS_Store* | ||
Icon? | ||
._* | ||
|
||
# Windows | ||
Thumbs.db | ||
ehthumbs.db | ||
Desktop.ini | ||
|
||
# Linux | ||
.directory | ||
*~ | ||
|
||
|
||
# npm | ||
node_modules | ||
package-lock.json | ||
*.log | ||
*.gz | ||
|
||
|
||
# Coveralls | ||
coverage | ||
|
||
# Benchmarking | ||
benchmarks/graphs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const express = require('express') | ||
const app = express() | ||
const port = process.env.PORT || 3000 | ||
app.use(express.json()) | ||
app.post('/', (req, res) => { | ||
const text = req.body.message.text | ||
res.json({ | ||
'text': `Received text: ${text}` | ||
}) | ||
}) | ||
app.listen(port, () => console.log(`delight-webhook-demo is listening on port ${port}!`)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "delight-webhook-demo", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "node index.js" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"express": "^4.17.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# delight-webhook-demo | ||
|
||
Install Dependencies | ||
```sh | ||
npm install | ||
``` | ||
|
||
--- | ||
Start server, the default port will be `3000` | ||
```sh | ||
npm start | ||
``` | ||
|
||
To run the server in different port | ||
```sh | ||
PORT=2000 npm start | ||
``` |