Livestream viewing with strims.gg chat.
First, ensure that you have Node.js (version 6 or greater) and npm (preferably
the latest stable release) installed. Then,
$ git clone https://github.com/MemeLabs/Rustla2.git
$ cd Rustla2/
$ cp .env.example .envEdit .env to change various environment variables. Most importantly,
JWT_SECRET should not be left blank. The following is recommended:
$ sed -i "s/JWT_SECRET=/JWT_SECRET=$(head -c 22 /dev/urandom | base64 | tr -dc A-Za-z0-9)/" .envInstall dependencies and build the frontend:
$ npm install
$ npm run buildThen, follow the instructions in api/README.md for how to start the backend
(which includes the API server and a web server for the frontend).
Retrieving thumbnails, viewer counts, and live statuses for Twitch streams requires a registered Twitch client.
-
Go to https://glass.twitch.tv/
-
Register a new developer application
-
Name the application whatever you want. The important part is that the Redirect URI is set to
$API/oauth. For example: -
Edit
.envto include your Redirect URI, Client ID, and Client Secret:TWITCH_CLIENT_ID=yourclientid TWITCH_CLIENT_SECRET=yourclientsecret TWITCH_REDIRECT_URI=http://localhost:3000/oauth
The process of building for development is essentially the same as building for production, except with the additional step of minifying the frontend JavaScript code. This reduces the overall size of the bundle that is served to users, which can result in faster page loads.
npm run build:production