Developer's Guide

Alexander Menshikov edited this page Dec 7, 2017 · 1 revision

How to run CodeX Bot Core

This article is about building CodeX Bot core for applications development. Throughout this guide, we build an application that can provide weather forecast for different periods of time.

For simplicity, we use our modern SDK for Python. We also provide instructions how to run your own production-ready CodeX Bot server.

Install necessary tools

  1. Python v. 3.5.3 can be downloaded by the link ( Just follow installation instructions. You can use newer versions if you need.
  2. MongoDB ( Useful hint – you can run Mongo with Docker. Just follow the instructions in the next section.
  3. Install virtual environment for Python apt-get install virtualenv или pip install virtualenv
  4. Initialize virtual environment with virtualenv venv -p python3.

Docker support

You can skip this paragraph if you do not need to run MongoDB or RabbitMQ in Docker.

  1. Create working directory mkdir mongo
  2. Run docker run -v mongo:/data/db -p 27017:27017 -d mongo
  3. Run docker run -d --hostname my-rabbit --name some-rabbit -p 5672:5672 -p 5671:5671 -p 8080:15672 rabbitmq:3

Prepare sources

  1. Copy our CodeX Bot core with git clone core
  2. cd core
  3. Activate virtual environment source ../venv/bin/activate
  4. Install necessary packages pip install -r requirements.txt
  5. If you don't have public IP address, you can use reverse-proxy. Download Ngrok (
  6. In separate terminal: ./ngrok http 1337


  1. Move configuration sample file to a new config cp core/codexbot/ core/codexbot/
  2. Change default URL in core/codexbot/ to that from ngrok's HTTPS section. Don't forget to add https:// before.
  3. Create your own bot with (
  4. Move Telegram configuration sample file to a new config cp core/codexbot/services/telegram/ core/codexbot/services/telegram/
  5. Input API TOKEN from BotFather to the telegram/
  6. Run python

Now, if you did all right, the CodeX Bot core will be running. Now, it's time to make your first CodeX Bot Application.

Developer's guide

Learn how to setup up an environment for developing an application that will be available in Slack and Telegram both

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.