Skip to content

The fastest way to customize an express server in current folder/director.

License

Notifications You must be signed in to change notification settings

switer/serverhere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverhere

logo

Create an express static server in current director with some options, includes gzip/livereload/view engine/port. If you thinks another something is useful and helpful, please tell me.

Installing

npm install serverhere -g

or

npm install ser -g

ser is a shortcut alisa for serverhere

Example

Following command create a server

  • that watch ./public for livereload
  • and enable gzip
  • and use jade as view engine
  • and default set port to 2014
  • and use ./public as static folder
serverhere --watch public --compress -e jade --port 2014 public

Before running, you need to install some dependencies:

npm install

Then run command to start your server:

npm start

Usage

 Usage: serverhere [options] <path>

        (path default is ".")


 Options:

   -h, --help             output usage information
   -V, --version          output the version number
   -p --port <port>       server listen port, default to 1024
   -c --compress          enable gzip
   -e --engine <type>     view's engine ejs/jade/hogan or any others, default not set
   -v --views <path>      views director path, default to "views"
   -w --watch <dir>       watch a dir and reload browser when files changed
   -i --ignore <ignore>   unwatch file/dir under the watch dir, use "," as separator of multiple file 

About

The fastest way to customize an express server in current folder/director.

Resources

License

Stars

Watchers

Forks

Packages

No packages published