mirror of
https://github.com/devkitshq/notifkit.git
synced 2026-10-19 18:24:52 +02:00
Notifkit Server & Client Example
This example demonstrates how to:
- Boot the full Notifkit Server with API and Admin Dashboard (
server.js). - Interact with the running server using the typed
NotifkitClientSDK (client.js). - Log into the built Admin Dashboard at
http://localhost:3000/admin.
1. Start the Server
Before running the server, ensure your project bundles are built:
# From repository root:
npm run build
npm run build:dashboard
Run the server script:
node examples/server-client/server.js
The server will start at http://localhost:3000 with the following default credentials:
- Admin Dashboard: http://localhost:3000/admin
- Email:
admin@example.com - Password:
admin123
2. Run the Client SDK
In another terminal, execute the client script:
node examples/server-client/client.js
The client script will:
- Sync notification templates (
welcome_notificationandsecurity_alert). - Upsert recipient user
usr_alex_99with email and SMS contact channels. - Dispatch a notification.
- Check the task delivery status.
You can view the real-time events and history logs immediately in your dashboard at http://localhost:3000/admin!