Skip to content

MemeLabs strims development

jbpratt edited this page Jul 17, 2020 · 10 revisions

Getting started

Requirements

Setup

Rustla2

git clone https://github.com/MemeLabs/Rustla2.git
cd Rustla2/
cp .env.example .env
# if on macos, read this block https://github.com/MemeLabs/Rustla2#setup 
sed -i "s/JWT_SECRET=/JWT_SECRET=$(head -c 22 /dev/urandom | base64 | tr -dc A-Za-z0-9)/" .env

For UI development only:

Update API_WS in the .env config with the production WebSocket API URL.

API_WS=wss://strims.gg/ws

Install the dependencies and start the webpack dev server

$ npm ci
$ npm run dev-server

You can access the dev server from your browser at http://localhost:3000.

For server development:

Follow these steps to set up a Twitch API client, ensuring to update the .env config. In the .env config file, comment out SSL_CERT_PATH and SSL_KEY_PATH and change PORT to 3001

pushd api/; git submodule update --init; popd
# should be standing in the root of the project
docker run \
  --name strims-api-dev \
  -v $(pwd):/Rustla2:rw \
  --net host \
  -it \
  --entrypoint /bin/bash \
  --workdir /Rustla2 \
  docker.pkg.github.com/memelabs/rustla2/rustla2-api:thirdPartyBase

# once inside container
cd /Rustla2/api
cmake . 
# to build and run the server
make -j $(nproc --all)
./rustla2_api --alsologtostderr
# to run tests
make test

After first run, the Sqlite DB will be created, then follow these steps for creating a new user.

chat

chat-gui

modbot

tsgg

Clone this wiki locally