Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelluk committed Sep 3, 2019
0 parents commit 218ff27
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .gitignore
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
11 changes: 11 additions & 0 deletions index.js
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}!`))
14 changes: 14 additions & 0 deletions package.json
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"
}
}
17 changes: 17 additions & 0 deletions readme.md
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
```

0 comments on commit 218ff27

Please sign in to comment.