Telegram bot for football weekend chat
- Clone repository:
git clone https://github.com/tormozz48/football-chat-bot.git
- Move to repo folder:
cd football-chat-bot
- Install npm dependencies:
npm install
Configuration files are:
- default - default configuration file
- production - configuration file for production environment
To use production configuration you should launch application with NODE_ENV
envrironment variable equal to production
. You can read more about configuration files here.
-
port
- http server port number -
bot
- telegram bot settingstoken
- unique bot token. Read more here: https://tlgrm.ru/docs/bots
-
cron
-serverPing
- cron expression for setting http-server ping interval
-
mongo
- mongo database connection parameters.user
- mongo database user.password
- mongo database password.host
- database host. Default:127.0.0.1
port
- database port. Default:27017
database
- name of database.
-
eventDate
- function which returns date of new created event.
Some of configuration parameters may be overrided by environment variables:
BOT_TOKEN
overridestoken
parameter inbot
config section.MONGO_USER
overridesuser
parameter in mongo database section.MONGO_PASSWORD
overridespassword
parameter in mongo database section.
For development purposes it suitable to launch application in dev-mode with embedded nodemon hot reload functionality.
npm run start-dev
For launch in production mode you should use:
npm run start-prod
- Launch code linting tool:
npm run lint
. - Launch unit-tests:
npm run test-unit
. - Launch code linting and unit-tests together:
npm test
. - Launch unit-tests with code coverage calculation:
npm run cover
.
Also code linter checks your code before every commit.
MIT