1 | # sèvè
|
2 |
|
3 | [![NPM version](http://img.shields.io/npm/v/seve.svg)](https://www.npmjs.org/package/seve) ![Downloads counter](http://img.shields.io/npm/dm/seve.svg)
|
4 |
|
5 | > Run a tiny & simple server (like, for tests & stuffs) from a given folder (or the current).
|
6 |
|
7 | * * *
|
8 |
|
9 | ## Usage
|
10 |
|
11 | ### Installation
|
12 |
|
13 | To use **sèvè**, you must at first install it globally.
|
14 |
|
15 | (sudo) npm install -g seve
|
16 |
|
17 | ### Usage
|
18 |
|
19 | Using **sèvè** is simple:
|
20 |
|
21 | seve [options] [folder]
|
22 |
|
23 | Arguments:
|
24 | [folder] folder to serve
|
25 |
|
26 | Options:
|
27 |
|
28 | -h, --help output usage information
|
29 | -V, --version output the version number
|
30 | -p, --port <port> port used by the server (default to 12345)
|
31 | -q, --quiet don't show the logs
|
32 | -i, --index enable autoindex
|
33 | -N, --no-open don't browse to the URL at startup
|
34 |
|
35 | #### Arguments
|
36 |
|
37 | ##### folder
|
38 |
|
39 | The folder to serve. If no folder is given (or if the given path isn't a folder), the current folder will be used.
|
40 |
|
41 | #### Options
|
42 |
|
43 | ##### port (`-p`,`--port <port>`)
|
44 |
|
45 | Manually setup the port for the server. Defaults to `12345`.
|
46 |
|
47 | ##### autoindex (`-i`,`--index`)
|
48 |
|
49 | When no index file (`index.html` or `index.html`) are found inside a folder, **sèvè** returns an `HTTP 404 Error`. Since version `0.6.0`, by activating this option, you can show an **autoindex**: a list of files & folders in the current path.
|
50 |
|
51 | ##### quiet (`-q`,`--quiet`)
|
52 |
|
53 | By default, **sèvè** output all the logs. You can tell him to shut the hell up with this option.
|
54 |
|
55 | ##### no open (`-N`,`--no-open`)
|
56 |
|
57 | By default (since version `0.5.0`), **sèvè** will browse to the URL of the server at startup. You can disable this behavior with this option.
|
58 |
|
59 | ##### help (`-h`,`--help`)
|
60 |
|
61 | Output usage information.
|
62 |
|
63 | ##### version (`-v`,`--version`)
|
64 |
|
65 | Output **sèvè**' version number.
|
66 |
|
67 | ## Note for ports 1 to 1024
|
68 |
|
69 | If you want to use a port number between 1 and 1024, **seve** must be run with sudo rights.
|
70 |
|
71 | ## Usage as grunt plugin
|
72 |
|
73 | There's many great grunt plugins to do what seve does, like [grunt-contrib-connect](https://github.com/gruntjs/grunt-contrib-connect).
|
74 |
|
75 | ## Contributing
|
76 |
|
77 | In lieu of a formal styleguide, take care to maintain the existing coding style. Lint your code using [Grunt](http://gruntjs.com/).
|
78 |
|
79 | ## Release History
|
80 |
|
81 | * **0.7.0**: Update dependencies, update tooling (*30/10/18*)
|
82 | * **0.6.0**: Add `--index` option (*21/05/16*)
|
83 | * **0.5.0**: Add browse to URL behavior & `--no-open` option (*21/02/16*)
|
84 | * **0.4.1**: Fix transpilation bug (*12/02/16*)
|
85 | * **0.4.0**: Rewrite package using ES2015 (*15/01/16*)
|
86 | * **0.3.0**: Warn & exit if seve needs sudo rights (*30/09/15*)
|
87 | * **0.2.0**: Accept a folder argument to choose the folder to serve (*28/08/15*)
|
88 | * **0.1.1**: Add time to logs (*23/09/14*)
|
89 | * **0.1.0**: Initial release (*11/09/14*)
|
90 |
|
91 | ### TODO
|
92 |
|
93 | * [x] Add auto-index option like [Tèsèvè](https://teseve.github.io).
|
94 |
|
95 | ## License
|
96 | Copyright (c) 2014 Leny
|
97 | Licensed under the MIT license.
|