Help you funding the creators and projects you appreciate with crypto currencies.
Create MySQL database according to server/database.sql
- Visit https://mixin.one, install and download Mixin Messenger
- Visit https://developers.mixin.one/dashboard, create a new bot, fill the bot info
- Copy
client ID
(应用 ID), generateclient secret
(应用密钥) and thekeystore json file
(应用 Session) at "密钥"
- Visit https://github.com/settings/developers and create a new Github OAuth App
- Visit https://github.com/settings/tokens and create a new personal token for development
- Create a file named
.env.local
- Required environment variables:
GITHUB_CLIENT_ID=YOUR_GITHUB_OAUTH_APP_CLIENT_ID
GITHUB_CLIENT_SECRET=YOUR_GITHUB_OAUTH_APP_CLIENT_SECRET
GITHUB_CLIENT_TOKEN=YOUR_GITHUB_OAUTH_APP_CLIENT_TOKEN
GITHUB_OAUTH_CALLBACK=YOUR_GITHUB_OAUTH_CALLBACK
MIXIN_CLIENT_ID=YOUR_MIXIN_BOT_CLIENT_ID
MIXIN_CLIENT_CONFIG=PATH_OF_KEYSTORE_FILE
MIXIN_CLIENT_SECRET=YOUR_MIXIN_BOT_CLIENT_SECRET
DATABASE_CONFIG={"host": "", "port": "3306", "username": "", "password": "", "database": ""}
- run
yarn
- run
yarn dev
- Create project, repositories, users and members manually into database
- Create wallet bots with
yarn exec-ts scripts/create-bots {projectId}
Approach 1: Use pm2
- Install
pm2
globally:yarn global add pm2
- Build assets:
yarn build
- Run server in background:
pm2 start --name Claps.dev npm -- start
Approach 2: Use systemd
-
Write a shell script at
/PATH/TO/CLAPS/start.sh
:#!/usr/bin/env bash # comment the line if you do not use nvm . /home/YOUR_NAME/.nvm/nvm.sh yarn start
-
Write a systemd service file at
/etc/systemd/system/claps.service
:[Unit] Description=Claps Service After=network.target After=systemd-user-sessions.service After=network-online.target [Service] ExecStart=/PATH/TO/CLAPS/start.sh WorkingDirectory=/home/ubuntu/claps Type=simple User=ubuntu Group=ubuntu Restart=always RestartSec=1s StartLimitIntervalSec=10 StartLimitBurst=10 [Install] WantedBy=multi-user.target
-
Enable claps service:
sudo systemctl enable claps.service
-
Start claps service:
sudo systemctl start claps.service