node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey ยป


connectifix npm version

Starts a development preview web server for simple, static projects and opens them in the default browser. Includes directory indexes, compression, modrewrite and livereload. No HTTPS. Since this is an opiniated selection of middleware and configurations, look at the options section to determine if it's useful for you. If the outcome is positive, you are probably a front-end developer.


$ npm install connectifix

Command line usage


"config": {
  "connectifix": {
    "root": "path/to/document-root"
"scripts": {
  "serve": "connectifix"

The config section is entirely optional. Cf. options. If you want to use it, you must run connectifix through a package script.


$ npm run serve

Programmatic usage

var connectifix = require('connectifix');
connectifix({/* cf. options */});

If no options are provided as an argument, connectifix looks for require('reverse-config').connectifix. Cf. Package.json under Command line usage. The resulting object (if any) is merged with the default options.


All options are optional.

  • {Array} [files=["css", "html", "jpg", "png", "svg"]]
    • extensions of files under options.root that trigger live reload
  • {string} [host="localhost"]
    • web server hostname
  • {string} [index=""]
  • {number} [port=9000]
    • web server port; can't be lower than 1024
  • {boolean} [public=true]
    • true: connect listens to the host ''
    • false: connect listens to the host
  • {number} [reload=35729]
    • livereload server port
  • {Array} [rewrite=[]]
  • {string} [root="./public"]
    • path to the document root