mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
chore: Re-organise examples
This commit is contained in:
parent
d9692f45a9
commit
17f839498e
@ -8,7 +8,7 @@ const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
|||||||
const url = 'https://<PUBLIC-URL>';
|
const url = 'https://<PUBLIC-URL>';
|
||||||
const port = process.env.PORT;
|
const port = process.env.PORT;
|
||||||
|
|
||||||
const TelegramBot = require('..');
|
const TelegramBot = require('../..');
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const bodyParser = require('body-parser');
|
const bodyParser = require('body-parser');
|
||||||
|
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
||||||
const TelegramBot = require('..');
|
const TelegramBot = require('../..');
|
||||||
const options = {
|
const options = {
|
||||||
webHook: {
|
webHook: {
|
||||||
// Port to which you should bind is assigned to $PORT variable
|
// Port to which you should bind is assigned to $PORT variable
|
@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
|
|
||||||
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
||||||
const TelegramBot = require('..');
|
const TelegramBot = require('../..');
|
||||||
const options = {
|
const options = {
|
||||||
webHook: {
|
webHook: {
|
||||||
port: 443,
|
port: 443,
|
||||||
key: `${__dirname}/key.pem`, // Path to file with PEM private key
|
key: `${__dirname}/../ssl/key.pem`, // Path to file with PEM private key
|
||||||
cert: `${__dirname}/crt.pem` // Path to file with PEM certificate
|
cert: `${__dirname}/../ssl/crt.pem` // Path to file with PEM certificate
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// This URL must route to the port set above (i.e. 443)
|
// This URL must route to the port set above (i.e. 443)
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
||||||
const TelegramBot = require('..');
|
const TelegramBot = require('../..');
|
||||||
const options = {
|
const options = {
|
||||||
webHook: {
|
webHook: {
|
||||||
// Just use 443 directly
|
// Just use 443 directly
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
|
||||||
const TelegramBot = require('..');
|
const TelegramBot = require('../..');
|
||||||
// See https://developers.openshift.com/en/node-js-environment-variables.html
|
// See https://developers.openshift.com/en/node-js-environment-variables.html
|
||||||
const options = {
|
const options = {
|
||||||
webHook: {
|
webHook: {
|
Loading…
x
Reference in New Issue
Block a user