Skip to content

dugjason/front-webhook-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started with Front Application Webhooks

This repository complements the Front Application Webhooks tutorial. Refer to the tutorial for specifics about how to work with Front Application Webhooks.

This sample app should provide you with a basic template to help scaffold your own Application Webhooks, including secure verification of payload content.

Available scripts and installation

In the project directory, you can run the following commands:

Install dependencies.

npm install

Run the app in development mode; useful for quick restarts during development.

npm run dev

Builds a production-ready version of your app.

npm run build

Run the built production version of the app.

npm run start

Connecting to Front

When creating the Webhook connector in Front, ensure you follow these steps;

  1. Copy your Front App Secret and paste it into the FRONT_APP_SECRET environment variable in the .env file, or local environment settings.
  2. Create a Server using the base URL of your app (see Exposing your endpoint (Local Development) if you're working locally)
  3. The app will serve the webhook endpoint at <your-app-url>/webhook.

Exposing your endpoint (Local Development)

For local development, you can use tools like ngrok, zrok.io or localcan to expose your local server to the internet. If using ngrok, run ngrok http 3000 to create a public URL that forwards to the app running locally on your machine at port 3000.

Framework

This uses Express as a fast and minimalist framework to handle incoming webhook calls. We make use of Express Middleware to perform validation and verification on incoming requests.

About

Sample application to validate and accept Front Application Webhook payloads

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published