Files
webhook-test/README.md
2026-05-12 16:21:00 +07:00

1.0 KiB

wa-test-nextjs

Mini app Next.js untuk test koneksi WhatsApp webhook ke nomor testing.

Halaman

  • /login
  • /settings
  • /test
  • /webhook-logs

API

  • GET /api/webhooks/whatsapp
  • POST /api/webhooks/whatsapp
  • POST /api/test/send

Flow test

  • kirim daftar
  • app balas minta nama
  • kirim nama
  • app balas konfirmasi

Jalankan

cp .env.example .env
npm install
npm run dev

Deploy test server

Target deploy:

  • domain wa.iptek.co
  • app port 127.0.0.1:3007
  • reverse proxy nginx

Contoh langkah di server:

cd /var/www
git clone https://git.iptek.co/wirabasalamah/webhook-test.git wa-test-nextjs
cd wa-test-nextjs
cp .env.example .env
npm ci
npm run build
npx pm2 start ecosystem.config.cjs
npx pm2 save

Set .env minimal:

NEXT_PUBLIC_APP_URL=https://wa.iptek.co
WHATSAPP_VERIFY_TOKEN=...
WHATSAPP_ACCESS_TOKEN=...
WHATSAPP_PHONE_NUMBER_ID=...
WA_TEST_NUMBER=...
WA_TEST_LOGIN_USERNAME=...
WA_TEST_LOGIN_PASSWORD=...
SESSION_SECRET=...

Contoh config nginx ada di deploy/nginx/wa.iptek.co.conf.