Production URL: https://twitch-brother-back.herokuapp.com
Java Micro Service with
- a Twitch Client to Poll Twitch API as fast as possible / authorized
- a websocket server pushing the results of the streaming datas to any connected client
- a bar chart to compare datas betweens the games
- You have to download and install the client (Angular 12) to consult all the analytics (see Frontend section)
- deployed on Heroku here: https://dashboard.heroku.com/apps/twitch-brother-back
Open Jdk - Java
- You may need to install if not OpenJdk: https://openjdk.java.net/install/
Redis
- Download and install Redis: https://github.com/microsoftarchive/redis/releases
- Leave default values, as Hostname =
localhost
and port6379
- Add redis repository to the
PATH
(Check box with MSI version) - with the default MSI version, windows starts autmatically a redis server as a service after installation
- from any cmd enter
redis-cli
- to see the saved results, enter
KEYS *
or use a GUI Client: https://www.npmjs.com/package/redis-commander
- Leave default values, as Hostname =
Maven
- Download and install maven: https://maven.apache.org/download.cgi
Environment Variables
- use the POM file sent via email including the environment variables, and replace the existing one with
add the dependencies on your system
- how to define theses variables in Intellij: https://www.jetbrains.com/help/objc/add-environment-variables-and-program-arguments.html#add-environment-variables
- Define following environment variables: - values will be provided to you by email
TWITCH_CLIENT_ID
= xxxTWITCH_CLIENT_SECRET
= xxxALLOWED_ORIGIN
= http://localhost:4200GAMES_LIST
=460630,497078,506274,490382
to add them easily: TWITCH_CLIENT_ID=xxx;TWITCH_CLIENT_SECRET=xxx;ALLOWED_ORIGIN=http://localhost:4200;REDIS_HOSTNAME=localhost;REDIS_PORT=6379;GAMES_LIST=460630,497078,506274,490382
Install dependencies
mvn clean install
mvn spring-boot:run
. The application will deploy on http://localhost:8080- you can modify the
GAMES_LIST
Environement Variable with any game id, pick one Category here https://www.twitch.tv/ubisof?lang=fr and look at "Category" in the URL- for example Watch Dogs is: https://www.twitch.tv/ubisoft/videos?filter=archives&category=512895
- run
mvn spring-boot:run -Dspring.profiles.active=dev
to display more logs
This server is running correctly if the logs are looking like:
You can copy and install the repository from: https://github.com/fukakai/TwitchBrother