-
Notifications
You must be signed in to change notification settings - Fork 24
MemeLabs strims development
Setting up development environments for MemeLabs' projects
https://guides.github.com/introduction/flow/
- Git
-
Docker
Rustla2
-
Node and NPM
Rustla2
,chat-gui
-
Go
chat
,modbot
,tsgg
-
Android Studio
android
https://github.com/MemeLabs/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
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
.
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
# this will create a development container, allowing for easy building
docker run \
--name strims-api-dev \
-v $(pwd):/Rustla2:rw \
--workdir /Rustla2 \
--net host \
-it \
--entrypoint /bin/bash \
docker.pkg.github.com/memelabs/rustla2/rustla2-api:thirdPartyBase
# inside the container
cd api
# to build and run the server
cmake . && make -j $(nproc --all)
./rustla2_api --alsologtostderr
# to run tests
cmake . && make test
After first run, the Sqlite DB will be created, then follow these steps for creating a new user.
https://github.com/MemeLabs/chat-gui
git clone https://github.com/MemeLabs/chat-gui.git
cd chat-gui/
cp .env.example .env
The .env
config file should look like this (depending on setup)
API_URI=http://localhost:8282
LOGIN_URI=http://localhost:3001/login
WEBSOCKET_URI=ws://localhost:8282/ws
WEBPACK_DEVSERVER_HOST=0.0.0.0
WEBPACK_DEVSERVER_HTTPS=false
Building and running is done like this:
# For development
npm run build
# Start webpack server at http://localhost:8282/
npm run start
https://github.com/MemeLabs/chat-gui/tree/master/assets/dev
https://poubelle.xyz/emotemaker
https://github.com/MemeLabs/chat
https://github.com/MemeLabs/chat.git
cd chat/
Create a settings.cfg
with the following contents (changing the values jwtsecret
to the generated one):
[default]
listenaddress = :9998
maxthrottletime = 300000000000
dbfile = chatbackend.sqlite
jwtcookiename = jwt
jwtsecret = {your jwt secret}
apiuserid = 11111111-1111-1111-1111-111111111111
messagecachesize = 250
usernameapi = http://localhost:3001/api/username/
viewerstateapi = http://localhost:3001/api/admin/viewer-states
debug = true
maxprocesses = 0
chatdelay = 300000000
# run the server
go run .
# execute unit tests
go test .
https://github.com/MemeLabs/modbot
git clone https://github.com/memelabs/modbot.git
cd modbot/
go build .
go run .