﷽
A unified platform to manage MSOCIETY community.
This project is rewritten to Typescript from Go: https://gitlab.com/msociety/msocietybot
Node.js 14. Install nvm (https://github.com/nvm-sh/nvm) then run nvm install
.
- Run
npm i
command - Copy
env.sample
to.env
- Setup database settings inside
.env
file - Create new bot and add token to
.env
file - Run
npm start
command
You can turn on debug (verbose) logging via supplying the env DEBUG
:
$ DEBUG=telegraf:client,msocietybot npm run start
$ docker-compose up
$ npm run test
Make sure you have docker installed and started. Then run test with:
$ TEST_USE_DOCKER=true npm run test
# start postgres in docker container exposing port 5432
$ docker run --name msocietybot-postgres -p 5432:5432 -e POSTGRES_PASSWORD=password -d postgres
$ npm run test
Migration scripts can be automatically generated by TypeORM:
$ npm run create-migration {migrationName}
It will work correctly as long as you have a db running with the latest migrations applied. TypeORM will calculate the differences using the schema to generate the new migrations.