1.0.10 • Published 6 years ago

vhosts v1.0.10

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

vhosts

A cli based vhosts server for express/connect apps

install

	npm install -g vhosts

quick start

> vhosts start
Daemon started with pid: 99999

> vhosts status
Daemon is running

> vhosts add www.mydomain.com /path/to/app.js
adding www.mydomain.com, /Users/kessler/dev/nodejs/vhosts/test/work/app.js

> vhosts remove www.mydomain.com
removing www.mydomain.com

> vhosts stop
Daemon was stopped

features:

  vhosts service can
    ✓ stop (stop command) 
    ✓ start (start command)
    ✓ report status (status command)
    ✓ service different vhosts
    - lists vhosts
    add vhosts on the fly
      ✓ via file creation in cache directory
      ✓ via add command
    remove hosts on the fly
      ✓ via file deletion
      ✓ via remove command
    add wildcard hosts
      ✓ for windows os - a file with _ to represent *
      ✓ for windows os - a file _ to represent *
      ✓ via add command

Apart from adding domains->app.js mapping via cli one might also do so via direct file creation at the directory specified in the config. The name of the file should be the domain (substituting _ for *) and the content of the file should be the path to an app.js file

configuration

standard rc config, named vhosts

	{		
		"port": 3000,		
		"directory": "/some/path",
		"extensionBlacklist": [".swx", "swp"]
	}
  • port - the port to use for the main web server
  • directory - where the domain to app path mapping resides (also see, directory-watcher)
  • extensionBlacklist - ignore files in the data directory with these extensions

one might also blend in sdt config options into main configuration

debug

linux/osx

	export DEBUG=vhosts*

windows

	set DEBUG=vhosts*

Alternatives

express-fast-vhosts

vhostess

TODO

  • implement restart server
  • implement reload vhost
1.0.10

6 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago