Add blacklist env

This commit is contained in:
Wildan M 2022-06-16 23:11:01 +07:00
commit fad216c968
9 changed files with 313 additions and 208 deletions

View file

@ -1,10 +1,12 @@
// development endpoint (use ngrok)
require('dotenv').config()
const http = require('http');
const listener = require('./src/client');
const server = http.createServer(listener);
const port = (process.argv.length >= 2 ? parseInt(process.argv[2]) : 0) || 3000;
const port = parseInt(process.env.HTTP_PORT || "3000");
if (require.main === module) {
server.listen(port, function () {