When a client subscribes to a streamer registered on the server,
it is a server that sends a notification through FCM according to the status.
Built to help with Twitch push notifications that sometimes don't come or come late.
- Node.js
- Twitch API
- Firebase (for firebase cloud messaging)
- MongoDB (for token management)
/server/.env
MONGODB_URI=<MongoDB_URI>
PORT=<Port number>
TWITCH_API_CLIENT_ID=<Twitch API Client Id>
TWITCH_API_BEARER_TOKEN=<Twitch API Bearer Token>
TWITCH_API_BASE_URL=https://api.twitch.tv/helix
How to get client id and bearer token ?
/server/serviceAccountKey.json
Set live broadcast check scheduler execution cycle (second)
/server/src/constants/interval.ts
List of streamers to check live
/server/src/constants/stream.ts
# /server
$ yarn install
# /server
$ yarn start
You can check if the server is running normally.
Register the fcm token generated by the client.
Request Body
{
token: String
}
Set up to receive streamer notifications of listings sent by client.
Request Body
{
token: String
topics: String[]
}