Skip to content

veyh/feedback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

feedback

This is a very simple backend service for a contact/feedback form on a website. It forwards messages over the Apprise API.

Examples where I use it:

Install & Run

Grab a release binary. Create a config.yml (see below). Run the server with

./feedback

It will search for config.yml in the current working directory by default. You can change it with the environment variable FEEDBACK_CONFIG_PATH.

API Usage

Javascript example

await fetch("https://feedback.example.com", {
  method: "POST",
  headers: {
    "content-type": "application/json",
  },
  body: JSON.stringify({
    subject: "My App", // required
    source: location.origin, // required
    message: "Hello there!", // required
    email: "user@example.com", // optional
  }),
})

Configuration

Stateful endpoint

addr: 127.0.0.1:3000
apprise:
  url: https://apprise.example.com/notify/example

Stateless endpoint

addr: 127.0.0.1:3000
apprise:
  url: https://apprise.example.com/notify
  stateless_urls: ntfys://user:pass@ntfy.example.com/topic

Extra headers

In case you need to add extra headers (eg. for auth purposes) use apprise.headers:

apprise:
  headers:
    some_header: some_value
    another_header: another_value

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages