New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@codeurs/n-proxy

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codeurs/n-proxy

Proxy all http requests to another process.

npmnpm
Version
0.0.1
Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

n-proxy

Proxy all http requests to another process.

Node server example

<?php
require './node_modules/@codeurs/n-proxy/proxy.php';
forward(
  // Server will be started if not running
  'node server.js',
  // Port on which the server will listen
  3000,
  // A version string which triggers a restart if changed since last run
  (string) filemtime('server.js')
);

If running under apache, you can rewrite all requests to this file:

RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php [QSA,L]

FAQs

Package last updated on 29 Jun 2022

Related posts