A simple web app where users can submit a message in the UI, and the backend securely forwards it to your Discord webhook.
- The Discord webhook URL is never exposed in browser code.
- Messages are sent through a Netlify Function (
netlify/functions/send-discord.js). - The frontend calls a clean endpoint (
/api/send-discord) via a Netlify redirect. V
- Open your Discord server settings.
- Go to Integrations -> Webhooks.
- Create a webhook and copy the webhook URL.
In Netlify UI:
- Open your site.
- Go to Site configuration -> Environment variables.
- Add:
- Key:
DISCORD_WEBHOOK_URL - Value: your Discord webhook URL
npm install
npm run devThen open:
http://localhost:8888
If prompted, authenticate with Netlify CLI (netlify login).
- Push this project to GitHub.
- In Netlify, click Add new site -> Import an existing project.
- Pick your repo.
- Netlify will use
netlify.tomlautomatically. - Add
DISCORD_WEBHOOK_URLin environment variables. - Deploy.
.
├─ netlify/
│ └─ functions/
│ └─ send-discord.js
├─ public/
│ ├─ app.js
│ ├─ index.html
│ └─ styles.css
├─ .gitignore
├─ netlify.toml
├─ package.json
└─ README.md
- Message limit is capped to 1900 characters to stay under Discord limits.
- Optional display name is supported and trimmed to 80 characters.
- You can customize branding in
public/styles.css.