Skip to content

Commit

Permalink
example: update express example
Browse files Browse the repository at this point in the history
  • Loading branch information
melroy89 committed Apr 30, 2020
1 parent 5169d79 commit 8bf57c1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/webhook/express.js
Expand Up @@ -10,7 +10,6 @@ const port = process.env.PORT;

const TelegramBot = require('../..');
const express = require('express');
const bodyParser = require('body-parser');

// No need to pass any parameters as we will handle the updates with Express
const bot = new TelegramBot(TOKEN);
Expand All @@ -21,7 +20,7 @@ bot.setWebHook(`${url}/bot${TOKEN}`);
const app = express();

// parse the updates to JSON
app.use(bodyParser.json());
app.use(express.json());

// We are receiving updates at the route below!
app.post(`/bot${TOKEN}`, (req, res) => {
Expand Down

0 comments on commit 8bf57c1

Please sign in to comment.