Http proxy help on creating more than one port


#1

My 3000 port is being used by uptime to keep my bot alive, but i want to get webhooks from discordbots.org and they use 5000.
I cant use it at the same time.
This is server.js

const express = require("express");
const app = express();
var HttpProxy = require('http-proxy')
app.get("/", (request, response) => {
  console.log("Ping received!");
  response.sendStatus(200);
});

// listen for requests :)
const listener = app.listen(process.env.PORT, function() {
  console.log('Your app is listening on port ' + listener.address().port);
});

const DBL = require('dblapi.js');

const http = require('http');


const server = http.createServer(app);

const dbla = new DBL(process.env.DBLTOKEN, { webhookPort: 5000, webhookAuth: 'heh', webhookServer: listener });
dbla.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbla.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});```

#2

also https://glitch.com/edit/#!/debugger is just mumbo jumbo to me


#3

I replied in the other thread…