<commit_before>const {log} = console;

const basicAuth = require('express-basic-auth');
const bodyParser = require('body-parser');
const compress = require('compression')();
const cors = require('cors');
const express = require('express');
const http = require('http');
const https = require('https');
const logger = require('morgan');
const {readFileSync} = require('fs');
const walnut = require('walnut');
const WebSocketServer = require('ws').Server;

const {addressesRouter} = require('./routers');
const {authorizer} = require('./routers');
const {balanceRouter} = require('./routers');
const {channelsRouter} = require('./routers');
const {connectionsRouter} = require('./routers');
const {cryptoRouter} = require('./routers');
const {exchangeRouter} = require('./routers');
const {historyRouter} = require('./routers');
const {invoicesRouter} = require('./routers');
const {lightningDaemon} = require('./lightning');
const {networkInfoRouter} = require('./routers');
const {paymentsRouter} = require('./routers');
const {peersRouter} = require('./routers');
const {purchasedRouter} = require('./routers');
const {rowTypes} = require('./lightning');
const {subscribeToInvoices} = require('./push');
const {subscribeToTransactions} = require('./push');
const {transactionsRouter} = require('./routers');
const {unlockWallet} = require('./lightning');
const {verifyClient} = require('./push');
const {walletInfoRouter} = require('./routers');

const {LNSERVICE_LND_DIR} = process.env;
const {NODE_ENV} = process.env;
const {PORT} = process.env;
const {LND_HOST, LND_PORT} = process.env;

const httpsPort = 18554;
const lndHost = LND_HOST || 'localhost';
const lndPort = LND_PORT || 10009;
const lndGrpcHost = `${lndHost}:${lndPort}`;
const logFormat = ':method :url :status - :response-time ms - :user-agent';
const port = PORT || 10553;

const app = express();
const lnd = lightningDaemon({host: lndGrpcHost});

const server = app
  .listen(port, () => log(null, `Listening HTTP on port: ${port}`))
  .on('error', e => log([500, 'ListenError']));

const [cert, key] = ['cert', 'key']
  .map(n => `${LNSERVICE_LND_DIR}/tls.${n}`)
  .map(n => readFileSync(n, 'utf8'));

const httpsServer = https.createServer({cert, key}, app);

const wss = [
  new WebSocketServer({server, verifyClient}),
  new WebSocketServer({server: httpsServer, verifyClient}),
];

httpsServer.listen(httpsPort);

app.disable('x-powered-by');
app.use(compress);<commit_msg>Updating grpc port variable name<commit_after>const {log} = console;

const basicAuth = require('express-basic-auth');
const bodyParser = require('body-parser');
const compress = require('compression')();
const cors = require('cors');
const express = require('express');
const http = require('http');
const https = require('https');
const logger = require('morgan');
const {readFileSync} = require('fs');
const walnut = require('walnut');
const WebSocketServer = require('ws').Server;

const {addressesRouter} = require('./routers');
const {authorizer} = require('./routers');
const {balanceRouter} = require('./routers');
const {channelsRouter} = require('./routers');
const {connectionsRouter} = require('./routers');
const {cryptoRouter} = require('./routers');
const {exchangeRouter} = require('./routers');
const {historyRouter} = require('./routers');
const {invoicesRouter} = require('./routers');
const {lightningDaemon} = require('./lightning');
const {networkInfoRouter} = require('./routers');
const {paymentsRouter} = require('./routers');
const {peersRouter} = require('./routers');
const {purchasedRouter} = require('./routers');
const {rowTypes} = require('./lightning');
const {subscribeToInvoices} = require('./push');
const {subscribeToTransactions} = require('./push');
const {transactionsRouter} = require('./routers');
const {unlockWallet} = require('./lightning');
const {verifyClient} = require('./push');
const {walletInfoRouter} = require('./routers');

const {LNSERVICE_LND_DIR} = process.env;
const {NODE_ENV} = process.env;
const {PORT} = process.env;
const {LND_HOST, LND_GRPC_PORT} = process.env;

const httpsPort = 18554;
const lndHost = LND_HOST || 'localhost';
const lndGrpcPort = LND_GRPC_PORT || 10009;
const lndGrpcHost = `${lndHost}:${lndGrpcPort}`;
const logFormat = ':method :url :status - :response-time ms - :user-agent';
const port = PORT || 10553;

const app = express();
const lnd = lightningDaemon({host: lndGrpcHost});

const server = app
  .listen(port, () => log(null, `Listening HTTP on port: ${port}`))
  .on('error', e => log([500, 'ListenError']));

const [cert, key] = ['cert', 'key']
  .map(n => `${LNSERVICE_LND_DIR}/tls.${n}`)
  .map(n => readFileSync(n, 'utf8'));

const httpsServer = https.createServer({cert, key}, app);

const wss = [
  new WebSocketServer({server, verifyClient}),
  new WebSocketServer({server: httpsServer, verifyClient}),
];

httpsServer.listen(httpsPort);

app.disable('x-powered-by');
app.use(compress);
{'fraction_non_alphanumeric': 0.1929860125684168, 'fraction_numerical': 0.007703223190756132, 'mean_word_length': 6.3096296296296295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1711376', 'n_tokens_mistral': 1553, 'n_tokens_neox': 1530, 'n_words': 375}