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

netget

Package Overview
Dependencies
Maintainers
0
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netget

Rette Adepto/ Recibido Directamente.

  • 2.5.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-90.45%
Maintainers
0
Weekly downloads
 
Created
Source
netget

NetGet

netget.me

Install:

Install NetGet globally using npm:

npm install -g netget

Start:

Once installed, start the NetGet by simply running the following command in the terminal:

netget

Modules:

NetGetX

Serves as a front face to the public. Provides an efficient, centralized solution for managing and directing public traffic to the correct internal services. Is particularly useful in environments where multiple services or applications must be accessible through a single entry point. netgetX

  • Public Interface: Serves as the front face to the public by acting as a reverse proxy that redirects all traffic to a specific port.
  • Optimal NGINX Configuration: Ensures that NGINX is set up as a robust and efficient channel, directing incoming traffic to the appropriate internal endpoints automatically.
  • Reverse Proxy Setup: Ideal for environments where multiple services or applications need to be accessible through a single entry point. This setup simplifies traffic management by centralizing the routing process. For example: Rather than having different domain names, server names, and configurations for each website or application, you set up NetGetX on a specific domain. Once configured, you point all your other domains to this NetGetX domain. This approach eliminates the need to maintain multiple DNS records, as they all redirect to the same place. NetGetX handles the traffic and routes it to the appropriate internal services based on your configurations.
    In summary, NetGetX provides an efficient, centralized solution for managing and directing public traffic to the correct internal services, simplifying domain and server management.

GateWays:

A Gateway in NetGet is a key component that manages incoming traffic in a more granular level. Here are the key points about its functionality: netgetX

  • Traffic Reception: Gateways receive traffic through an input port. Typically plugged in after a NetGetX to handle all public requests.
  • Request Management: The gateway identifies the requester, domain, subdomain, or path of the incoming request.
  • Route Handling: Based on predefined routes, the gateway determines how to handle each request.
  • Redirection: The gateway can redirect requests to another port where a different server is active.
  • Request Handling: Alternatively, it can process the request directly using specified handlers. In essence, a Gateway acts as a traffic manager, directing and processing incoming requests based on defined rules and routes.

Port Management:

"I traced the cord back to the wall, no wonder it was ever plugged in at all ... ♪ ♪ ♪ netgetX

  • Check Port Activity: Users can check what processes are running on a specific port.
  • Kill Processes: Facilitates the termination of processes running on a selected port by converting port numbers to PIDs. In summary, the Port Management menu offers comprehensive control over port configurations and process management, streamlining the process of monitoring and managing network traffic and making the right connections easy.

Local NetGet Setup: On your local machine, NetGet operates within your Node.js environment, managing local traffic and processing requests according to your configured rules. The GateWays doesn't directly face the internet and instead communicates with an external NetGetX instance that does or any other service.

Install as a Node Module Dependency.

npm install netget

GateWay SetUp

// NETGET
import NetGet from 'netget';
import { routes } from './GET/routes.js';
let netget = new NetGet();
netget.Gateway({ routes: routes }).listen();

If no port specified the Gateway listens at http://localhost:3432/ This will set up a gateway that will listen to all traffic in a specific port, detect the domain, host, subdomain and act accordingly.

Constructor:

  • Initializes a new instance of the Gateway class.
class Gateway {
  constructor({   
   host = process.env.HOST || 'localhost', 
   port = process.env.NETGET_PORT || 3432, 
   routes = {},
   domainsConfigPath = process.env.DOMAINS_CONFIG_PATH || '~/.get/domains.json' 
  } = {}) {
   this.host = host;
   this.port = port;
   this.routes = routes;
   this.domainsConfigPath = domainsConfigPath;
   this.app = express();
   this.initialize().catch(err => console.error('Initialization error:', err));
  }

It detects the host making the request, the domain and the subdomain. Acting accordingly through the routes given and its handlers.

Scalable Web Services

In a microservices architecture, NetGet can route requests to different services within your infrastructure, making it an ideal solution for developers looking to scale their applications horizontally. Each service can have its own domain, and NetGet will ensure that requests are forwarded to the correct service.

Personal Hosting Solutions

For personal web hosting, NetGet provides an easy-to-set-up gateway for routing traffic to various self-hosted applications.

Secure Access Control

Combined with authentication layers, NetGet can control access to various parts of a web infrastructure, ensuring that only authorized users can access specific services.

By Neurons.me

License & Policies
  • License: MIT License (see LICENSE for details).
  • Privacy Policy: Respects user privacy; no collection/storage of personal data.
  • Terms of Usage: Use responsibly. No guarantees/warranties provided. Terms | Privacy neurons.me logo

Keywords

FAQs

Package last updated on 08 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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