Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gravity-ui/expresskit

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gravity-ui/expresskit - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

dist/expresskit.d.ts

@@ -13,2 +13,4 @@ /// <reference types="node" />

run(): void;
private getAppSocket;
private getListenTarget;
}

18

dist/expresskit.js

@@ -17,2 +17,4 @@ "use strict";

var _a;
this.getAppSocket = () => process.env.APP_SOCKET || this.config.appSocket;
this.getListenTarget = (appSocket) => process.env.APP_PORT || this.config.appPort || appSocket || DEFAULT_PORT;
this.nodekit = nodekit;

@@ -29,10 +31,6 @@ this.config = nodekit.config;

(0, router_1.setupRoutes)(this.nodekit.ctx, this.express, routes);
}
run() {
const appSocket = process.env.APP_SOCKET || this.config.appSocket;
const listenTarget = process.env.APP_PORT || this.config.appPort || appSocket || DEFAULT_PORT;
const listenTargetType = appSocket === listenTarget ? 'socket' : 'port';
this.nodekit.ctx.log(`Listening on ${listenTargetType} ${listenTarget}`);
const appSocket = this.getAppSocket();
const listenTarget = this.getListenTarget(appSocket);
if (appSocket &&
listenTargetType === 'socket' &&
listenTarget === appSocket &&
cluster_1.default.isPrimary &&

@@ -42,2 +40,8 @@ fs_1.default.existsSync(appSocket)) {

}
}
run() {
const appSocket = this.getAppSocket();
const listenTarget = this.getListenTarget(appSocket);
const listenTargetType = appSocket === listenTarget ? 'socket' : 'port';
this.nodekit.ctx.log(`Listening on ${listenTargetType} ${listenTarget}`);
this.httpServer = this.express.listen(listenTarget, () => {

@@ -44,0 +48,0 @@ this.nodekit.ctx.log('App is running');

{
"name": "@gravity-ui/expresskit",
"version": "1.1.1",
"version": "1.1.2",
"description": "Express.js wrapper for NodeKit-based apps",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc