Browse Source

app.ts lg

docker-workflow-build
Evan Feenstra 4 years ago
parent
commit
909696c752
  1. 7
      app.ts
  2. 7
      dist/app.js
  3. 2
      dist/app.js.map
  4. 1
      dist/src/utils/tribes.js
  5. 2
      dist/src/utils/tribes.js.map
  6. 1
      src/utils/tribes.ts

7
app.ts

@ -3,7 +3,6 @@ import * as bodyParser from 'body-parser'
import * as helmet from 'helmet'
import * as cookieParser from 'cookie-parser'
import * as cors from 'cors'
import * as path from 'path'
import logger from './src/utils/logger'
import { pingHubInterval, checkInvitesHubInterval } from './src/hub'
import { setupDatabase, setupDone } from './src/utils/setup'
@ -13,14 +12,14 @@ import * as network from './src/network'
import { authModule, unlocker } from './src/auth'
import * as grpc from './src/grpc'
import * as cert from './src/utils/cert'
import {loadConfig} from './src/utils/config'
const env = process.env.NODE_ENV || 'development';
const config = require(path.join(__dirname, 'config/app.json'))[env];
const config = loadConfig()
const port = process.env.PORT || config.node_http_port || 3001
console.log("=> env:", env)
console.log('=> process.env.PORT:', process.env.PORT)
console.log('=> config.node_http_port:', config.node_http_port)
console.log('=> config: ',config)
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA'

7
dist/app.js

@ -14,7 +14,6 @@ const bodyParser = require("body-parser");
const helmet = require("helmet");
const cookieParser = require("cookie-parser");
const cors = require("cors");
const path = require("path");
const logger_1 = require("./src/utils/logger");
const hub_1 = require("./src/hub");
const setup_1 = require("./src/utils/setup");
@ -24,12 +23,12 @@ const network = require("./src/network");
const auth_1 = require("./src/auth");
const grpc = require("./src/grpc");
const cert = require("./src/utils/cert");
const config_1 = require("./src/utils/config");
const env = process.env.NODE_ENV || 'development';
const config = require(path.join(__dirname, 'config/app.json'))[env];
const config = config_1.loadConfig();
const port = process.env.PORT || config.node_http_port || 3001;
console.log("=> env:", env);
console.log('=> process.env.PORT:', process.env.PORT);
console.log('=> config.node_http_port:', config.node_http_port);
console.log('=> config: ', config);
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDS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AAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACrB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YACtB,OAAO,EAAE,CAAA;SACT;aAAM;YACN,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,UAAgB,GAAG,EAAE,GAAG;;oBAC3C,MAAM,EAAE,GAAG,MAAM,eAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;oBACnC,IAAI,EAAE,EAAE;wBACP,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;wBACjC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;wBACrB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;wBACtB,OAAO,EAAE,CAAA;qBACT;gBACF,CAAC;aAAA,CAAC,CAAA;SACF;IAEF,CAAC,CAAA,CAAC,CAAA;AACH,CAAC"}

1
dist/src/utils/tribes.js

@ -22,7 +22,6 @@ const config = config_1.loadConfig();
let client;
function connect(onMessage) {
return __awaiter(this, void 0, void 0, function* () {
console.log('=> CONNECT TO TRIBES SERVER', config);
try {
const info = yield LND.getInfo();
function reconnect() {

2
dist/src/utils/tribes.js.map

File diff suppressed because one or more lines are too long

1
src/utils/tribes.ts

@ -15,7 +15,6 @@ const config = loadConfig()
let client: any
export async function connect(onMessage) {
console.log('=> CONNECT TO TRIBES SERVER',config)
try {
const info = await LND.getInfo()

Loading…
Cancel
Save