This is an official repository of the backend service (EBS) for StarCraft II Profile Twitch Extension.
For current status see the kanban board of the project.
To run a server you need Node.js (preferably LTS version), MongoDB and Redis installed. MongoDB and Redis must be running before starting the API server.
Launching MongoDB as a service in Ubuntu and tailing the log file:
$ sudo service mongod start $ tail -f /var/log/mongodb/mongod.log
cp .env.sample .env to create an environment variables file based on the provided template. Fill it with the following details:
API_MONGODB_CONNECTION_STRING- if different than the default value
API_REDIS_CONNECTION_STRING- if different than the default value
API_BATTLENET_KEY- Battle.net API key. To obtain it you must create the application on Battle.net Developer Portal
API_BATTLENET_SECRET- Battle.net API secret. To obtain it you must create the application on Battle.net Developer Portal
API_TWITCH_EXTENSION_CLIENT_ID- Client ID needed to identify an app on Twitch ecosystem. To obtain it you must create an extension via Extensions Dashboard on Twitch Developers portal
API_TWITCH_EXTENSION_SHARED_SECRET- secret string used by Twitch to sign JSON Web Tokens. To obtain it you must create an extension via Extensions Dashboard on Twitch Developers portal
When running the API via HTTPS you need a SSL key / certificate pair. For localhost you can create a self-signed cert. Rename the key and the cert respectively to
server.crt. Copy them to
ssl/ directory of the project.
When configured correctly, you can launch the project with
npm run dev.
You can now proceed to set up the extension frontend.
See the project homepage for contact information.
Code is available under MIT license. See LICENSE for more information.