Skip to content

IronWill79/express-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-webhook

NodeJS/Express webhook to trigger something

Boilerplate that accepts a POST request at /hook/{.env/WEBHOOK_PATH} and parrots back the response

Dependencies

Package Version URL
NodeJS v16.x https://nodejs.org
express ^4.17.1 https://www.npmjs.com/package/express
body-parser ^1.19.0 https://www.npmjs.com/package/body-parser
dotenv ^10.0.0 https://www.npmjs.com/package/dotenv

Setup

  1. Clone the repo
  2. Run yarn to install node modules
  3. Copy .env.example to .env and set variables
  4. Set TESTING to false to execute script
  5. Ensure shell script has execute permissions

Local Execution

  1. yarn start
  2. Browse to localhost:PORT/hook/WEBHOOK_PATH

Deployment

  1. Setup PM2
  2. Run pm2 start npm --name express-webhook -- run start
  3. Serve the port through the firewall or use Nginx to proxy

About

NodeJS/Express webhook to trigger something

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published