New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

web-server-rewrite

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-server-rewrite

Small HTTP server

latest
Source
npmnpm
Version
0.4.2
Version published
Weekly downloads
6
20%
Maintainers
1
Weekly downloads
 
Created
Source

Web Server ReWrite

A beautiful http server with php process and rewrite options (.htaccess)

Install

sudo npm install -g web-server-rewrite

How to start

To activate options rewriting, you must create a file called rewrite.json in your root project folder

The structure of rewrite.json is:

{
    "pages": {
        "/": "index.html",
        "/produtos": "produtos.html",
        "/produtos/:name/:id": "products.php?name=$1&id=$2",
        "/usuario/([a-z0-9.-_]+)": "user.php?user=$1"
    }
}

RegExp to RestFull style shortcuts:

:name, :page, :action, :module => ([\w]+)
:id => ([\d]+)

Usage: web-server [options]

Options:

  -p, --port     change port to server listen
  -b, --base     root folder for web access

Examples:

  $ web-server --port=3000
  $ web-server -b=public_html/

FAQs

Package last updated on 05 Mar 2014

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