title: How to combine two different logic parts of node.js application? (telegram-bot and http-server)
body: <p>It's my first node.js real application. I started from create telegram bot with especial framework <a href="https://github.com/yagop/node-telegram-bot-api" rel="nofollow noreferrer">Node-Telegram-Bot-Api</a></p>
  
  <p>This bot processes the sequence of questions, like name, phone, location and photo, audio message, saves files to server and joins all this staff to one object and writes it to MongoDB. </p>
  
  <p>It was just file index.js, where I have done all things... </p>
  
  <p>Now I faced with new task - create web interface for this data. I installed <a href="http://expressjs.com/en/starter/generator.html" rel="nofollow noreferrer">express-generator</a> and created with it site, with ready to use handlebar view, some routes, sass support and serving static files  - all useful things for making a web interface... </p>
  
  <p><strong>Question is - how to combine two parts:</strong> </p>
  
  <ol>
  <li><p>telegram-bot part, which fills database with data and </p></li>
  <li><p>express http-server, witch supports routs, views and displays data from database, and also serves the files: photos and voice messages...</p></li>
  </ol>
  
  <p>I'm sorry if the question is stupid. But it is my first real work in node.js, please try to understand me. </p>