npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

forward-pg-tunnel

v1.0.1

Published

This package allows you to transfer access to the postgres database through a tunnel

Downloads

6

Readme

Forward-PG-Tunnel

English

Deіcription

Package for creating an ssh tunnel and sending additional messages to the PostgreSQL database

Getting started

To start, you need to fill in the default configuration file located in the config folder.

Configuration file

| Section | Key | Type | Example | Description| |---|---|---|---|---| |sshConfig|host|string|"20.95.0.236"|SSH route host| |sshConfig|port|503|number|SSH port to the route| |sshConfig|username|string|"root"|SSH route login| |sshConfig|password|string|""|SSH route password. If not used leave blank| |sshConfig|privateKey|string|"~/.ssh/id_rsa_dell_r620"|The path to the connection key| |tunnelOptions|autoClose|boolean|true|Auto close tunnel| |serverOptions|host|string|"localhost"|Local address where the TCP server will be started| |serverOptions|port|number|5432|Local port where the TCP server will be running| |forwardOptions|srcPort|number|5432|Port on the remote host that will be sent to the local host| |forwardOptions|dstAddr|string|"192.168.0.105"|Database address on the remote host| |forwardOptions|dstPort|number|5432|Database port on a remote host| |pgClient|user|string|"postgre"|Database user| |pgClient|host|string|"localhost"|Database host| |pgClient|database|string|"postgre"|Database name| |pgClient|password|string|"password"|DB password| |pgClient|port|number|5432|DB port| |visible|show|boolean|true|Reflection of alkalis during Operation|

Usage examples

Create an instance and call the methods

import PostgreTunnelConnector from 'forward-pg-tunnel';

const dbConnector = new PostgreTunnelConnector();
dbConnector.runQuery("SELECT * FROM regions limit 5");

Українська

Опис

Пакет для створення ssh тунелю та пробросу досупів до бази данних PostgreSQL

Початок роботи

Для пзапуску необхідно заповнити конфігураційний файл default котрий знаходиться в папці config.

Конфігуційний файл

| Розділ | Ключ | Тип | Приклад | Опис| |---|---|---|---|---| |sshConfig|host|string|"5.59.105.0"|Хост ssh маршруту| |sshConfig|port|503|number|Порт ssh маршруту| |sshConfig|username|string|"root"|Логін ssh маршруту| |sshConfig|password|string|""|Пароль ssh маршруту. Якщо не використовуєтья залишити порожнім| |sshConfig|privateKey|string|"~/.ssh/id_rsa_dell_r620"|Шлях до ключа підключення| |tunnelOptions|autoClose|boolean|true|Автозачинення тунелю| |serverOptions|host|string|"localhost"|Локальна адреса, на якій буде запущений TCP сервер| |serverOptions|port|number|5432|Локальний порт, на якому буде запущений TCP сервер| |forwardOptions|srcPort|number|5432|Порт на віддаленому хості, який буде проброшен на локальний хост| |forwardOptions|dstAddr|string|"192.168.0.105"|Адреса бази даних на віддаленому хості| |forwardOptions|dstPort|number|5432|Порт бази даних на віддаленому хості| |pgClient|user|string|"postgre"|Користувач БД| |pgClient|host|string|"localhost"|Хост БД| |pgClient|database|string|"postgre"|Назва БД| |pgClient|password|string|"password"|Пароль БД| |pgClient|port|number|5432|Порт БД| |visible|show|boolean|true|Відображення логів у процессі роботи|

Приклади використання

Створіть екземпляр і викликайте методи

import PostgreTunnelConnector from 'forward-pg-tunnel'

const dbConnector = new PostgreTunnelConnector();
dbConnector.runQuery("SELECT * FROM regions limit 5");