Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snapshot-labs/snapshot-webhook
Snapshot notification service.
https://github.com/snapshot-labs/snapshot-webhook
Last synced: about 2 months ago
JSON representation
Snapshot notification service.
- Host: GitHub
- URL: https://github.com/snapshot-labs/snapshot-webhook
- Owner: snapshot-labs
- License: mit
- Created: 2021-09-29T18:50:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-21T18:57:50.000Z (2 months ago)
- Last Synced: 2024-11-21T19:37:25.625Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 2.18 MB
- Stars: 10
- Watchers: 4
- Forks: 15
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Snapshot webhook
Microservice to send Snapshot related notifications to multiple communication channels.
### Get started
- Fork this repository then run this command to install dependencies:
```shell
yarn install
```- Create a MySQL database then setup a new file `.env` with the MySQL connection string:
```dotenv
DATABASE_URL=mysql://...
HUB_URL=https://hub.snapshot.org # Use https://testnet.hub.snapshot.org for the demo instance
SERVICE_EVENTS=1
```- Run [this MySQL query](src/helpers/schema.sql) to create tables on the database.
- Comment line(s) on [this file](src/providers/index.ts) to disable provider(s).
- Run the `dev` script to start the server
```shell
yarn dev
```### Add a provider
Create a new file with the name of the provider in the folder `./src/providers` and expose a method `send` following the same format than on others files in the same folder. Then add the provider in the file `./src/providers/index`.
[MIT](LICENSE).