light-web-server
v1.3.0
Published
Simple web server using PHP built-in web server.
Downloads
29
Readme
Light web server
Simple web server using PHP built-in web server. Windows only. If you are on macOS, locally installed PHP will be run (with given params).
Prerequisites
Node.js and npm already installed on your machine.
Instalation
Install package via npm
in your project as a dependency:
npm install light-web-server --save-dev
Usage
In your project directory:
lws --hostname=192.168.1.252 --port=9000 --dir=test/
It will start the web server available at http://192.168.1.252:9000/
(default hostname is localhost
, default port is :8000
).
URI requests are served from the current working directory, unless the --dir=
flag (parameter) is used to specify an explicit document root.
CLI parameters
| Parameter | Description |
| ---------- | -------------------------- |
| hostname
| port (default localhost
) |
| port
| port (default 8000
) |
| dir
| document root directory |
PHP version
7.1.11