Coder Social home page Coder Social logo

msocietybot's Introduction

MSOCIETY Bot

CI Dependencies codecov Known Vulnerabilities

A unified platform to manage MSOCIETY community.

This project is rewritten to Typescript from Go: https://gitlab.com/msociety/msocietybot

Prerequisites

Node.js 14. Install nvm (https://github.com/nvm-sh/nvm) then run nvm install.

Running

  1. Run npm i command
  2. Copy env.sample to .env
  3. Setup database settings inside .env file
  4. Create new bot and add token to .env file
  5. Run npm start command

Output verbose logging

You can turn on debug (verbose) logging via supplying the env DEBUG:

$ DEBUG=telegraf:client,msocietybot npm run start

Running (with Docker)

$ docker-compose up

Contributing

Running tests

$ npm run test

With automatic docker container setup/teardown

Make sure you have docker installed and started. Then run test with:

$ TEST_USE_DOCKER=true npm run test

With manual docker container

# 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

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.

msocietybot's People

Contributors

ruqqq avatar azizsafudin avatar iamfeek avatar snyk-bot avatar dependabot[bot] avatar waimin314 avatar ahmadsyafiqruhazat avatar muhdmirzamz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.