chore: Re-organise examples

release
GochoMugo 8 years ago
parent d9692f45a9
commit 17f839498e
No known key found for this signature in database
GPG Key ID: 7B6A01CB57AA39E4
  1. 0
      examples/ssl/crt.pem
  2. 0
      examples/ssl/key.pem
  3. 2
      examples/webhook/express.js
  4. 2
      examples/webhook/heroku.js
  5. 6
      examples/webhook/https.js
  6. 2
      examples/webhook/now.js
  7. 2
      examples/webhook/openshift2.js

@ -8,7 +8,7 @@ const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
const url = 'https://<PUBLIC-URL>';
const port = process.env.PORT;
const TelegramBot = require('..');
const TelegramBot = require('../..');
const express = require('express');
const bodyParser = require('body-parser');

@ -5,7 +5,7 @@
const TOKEN = process.env.TELEGRAM_TOKEN || 'YOUR_TELEGRAM_BOT_TOKEN';
const TelegramBot = require('..');
const TelegramBot = require('../..');
const options = {
webHook: {
// 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 TelegramBot = require('..');
const TelegramBot = require('../..');
const options = {
webHook: {
port: 443,
key: `${__dirname}/key.pem`, // Path to file with PEM private key
cert: `${__dirname}/crt.pem` // Path to file with PEM certificate
key: `${__dirname}/../ssl/key.pem`, // Path to file with PEM private key
cert: `${__dirname}/../ssl/crt.pem` // Path to file with PEM certificate
}
};
// 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 TelegramBot = require('..');
const TelegramBot = require('../..');
const options = {
webHook: {
// Just use 443 directly

@ -5,7 +5,7 @@
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
const options = {
webHook: {
Loading…
Cancel
Save