1.0.5 • Published 1 year ago

@xan105/qwebsrv v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

About

Quick web server for easy dev with static files and modern web browser and their pseudo security limitation.

Install & Usage

  1. Install the package.
npm i -D @xan105/qwebsrv
  1. Configure it by adding a config obj in your package.json.

Here are the default options:

{
  "config": {
    "host": "localhost",
    "port": 80,
    "proxy": false, /*set to true only if you're behind a reverse proxy 
                     (Heroku, Bluemix, AWS ELB, Nginx, etc)*/
    "cors": true,
    "csp": false, //default secure csp header rules
    "root": "./docs", //GitHub Pages
    "index": ["index.html"],
    "404": "404.html", 
    "etag": false,
    "maxAge": "1m"
  }
}

Change what you need and you can omit the rest.

  1. Add a script entry in your package.json to start the server.

Example:

{
  "scripts": {
    "start": "websrv"
  }
}
1.0.5

1 year ago

1.0.2

2 years ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago