luvi v6.0.1
luvi ♡
Simple dev server with Markdown support, CLI, and API.
$ cd /path/to/your/project
$ luvi
♡ luvi listening on 4444By default, luvi acts as a static server, serving the files in cwd.
Changes
- 6.0.0:
- Removed:
- Port finder (undocumented)
- Custom 404 page (has a default)
- Custom onListen
- JSON configs (use the JS API)
- Added:
- Using through the Node API now returns an http.server
- Changed:
opendefaults to false- Markdown support is always on
- Removed:
- 5.2.0: Switch back to MIT license
- 5.1.0: Add Markdown support
- 5.0.0: Remove support for Node 8
- 4.0.0: Switch to LGPL-3.0
- 3.2.0: Un-deprecate, and add
.htmand.xhtmlsupport. - 3.0.0: Removed
lvshorthand. Use a shell alias. - 2.1.1: Deprecated
lvshorthand. This will still work until it's removed in 3.0.0. Please update any scripts usinglvto useluvi. - 2.0.0: Switched to MIT license.
- 0.8.6:
luvino longer has a proxying utility. - 0.9.13:
src/utilis nowsrc/lib. - 0.9.19:
src/is now project root (src/libis now/lib) - 0.9.20:
package.jsonis fixed soluviworks as a module again. Sorry about that! - 0.9.21: Please
npm rm -g luviand thennpm i -g luvito upgrade!
Installation and Usage
$ npm i -g luvi
$ luvi [options]If you'd rather not install globally, you can use npx:
npx luvi [options].
options
♡ luvi (a server)
------------------
usage:
♡ luvi # launch server with default config
♡ luvi -p 1337 # listen on specified port
♡ luvi -r /path # serve from specified dir
♡ luvi -o # open the browser after start
♡ luvi -v # luvi version
♡ luvi -h # this help
--------------------
see the readme for flags and apiAPI
You can pass an object to luvi() for custom settings; otherwise, these
defaults are applied:
const luvi = require('luvi')
const l = luvi({
name: 'luvi',
root: process.cwd(),
port: 4444
})
// returns an http.server, so you can call l.close() when you're done with itThis is exactly the same as just calling luvi(), with no config object.
These defaults are merged with whatever you pass, so if, for example, you only
pass in a custom server name, luvi will still run on port 4444 and use cwd
as the root to serve.
Multiple servers can be launched from the same script, with different configs,
by calling luvi() again with different options.
Options
- root:
string(default:process.cwd())- Path where your static files are placed. Server only allows access to files in this directory.
Usually where you'd have
index.html. Can be absolute or relative. - Example:
root: '/path/to/document/root'
- Path where your static files are placed. Server only allows access to files in this directory.
Usually where you'd have
- port:
number(default:4444)- Port on which to listen.
- Example:
port: 3000
- open:
bool(default:false)- Open the browser on server start.
- Example:
open: true
Contributing
Please do, if you'd like! Any issue reports/fixes are welcome. I am not considering adding any features.
1 year ago
1 year ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago