Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

luvi

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luvi - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

2

package.json
{
"name": "luvi",
"description": "Dev server with simple config and API.",
"version": "2.0.2",
"version": "2.0.3",
"author": "Zac Anger <zac@zacanger.com> (http://zacanger.com)",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -39,3 +39,3 @@ # luvi ♡

## Installation & Usage
## Installation and Usage

@@ -50,2 +50,5 @@ ```shell

If you'd rather not install globally, you can use `npx`:
`npx luvi [server, ...] [options]`.
#### [server, ...]

@@ -88,3 +91,3 @@

To configure a single server: `{"root":"public","port":9090}`.
To configure a single server: `{ "root": "public", "port": 9090 }`.
The object will be passed directly to `luvi`.

@@ -96,16 +99,20 @@

```json
[{
"name": "drafts",
"root": "src",
"port": 1337
}, {
"name": "testing",
"root": "build",
"noOpen": true
}, {
"name": "todo",
"root": "doc",
"port": 6565,
"notFound": "/var/www/404.html"
}]
[
{
"name": "drafts",
"root": "src",
"port": 1337
},
{
"name": "testing",
"root": "build",
"noOpen": true
},
{
"name": "todo",
"root": "doc",
"port": 6565,
"notFound": "/var/www/404.html"
}
]
```

@@ -122,6 +129,7 @@

const luvi = require('luvi')
luvi({
name : 'luvi'
, root : process.cwd()
, port : 4444
name: 'luvi',
root: process.cwd(),
port: 4444
})

@@ -139,29 +147,23 @@ ```

#### options
#### Options
* root
* `root: '/path/to/document/root'`
* _Str_ Path where your static files are placed. Server only allows access to files in this directory.
* 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.
* Default : `process.cwd()`
* port
* `port: 3000`
* _Int_ Port on which to listen. If specified port is busy, `luvi` will look for a free port.
* Default : `4444`.
* name
* `name: 'foo'`
* _Str_ Server name. Useful for launching multiple servers, and for keeping track in logs.
* Default : `luvi`.
* onListen
* `onListen: function(name, port){console.log(name, 'is listening on', port)}`
* _function(name,port)_ Called when `luvi` starts listening.
* Default : `console.log()` (as above) and opening the browser.
* notFound
* `notFound`: `'/path/to/404.html'`
* _Str_ Path to a custom 404 page.
* Default : `undefined`.
* noOpen
* `noOpen: true`
* _Bool_ Will not open the browser on server start.
* Default: `undefined`.
* Example: `root: '/path/to/document/root'`
* port: `number` (default: `4444`)
* Port on which to listen. If specified port is busy, `luvi` will look for a free port.
* Example: `port: 3000`
* name: `string` (default: `luvi`)
* Server name. Useful for launching multiple servers, and for keeping track in logs.
* Example: `name: 'foo'`
* onListen: `(name: string, port: number): void` (Default: `console.log ; open`)
* Called when `luvi` starts listening.
* Example: `onListen: (name, port) => { console.log(name, 'is listening on', port) }`
* notFound: `string` (default: `undefined`)
* Path to a custom 404 page.
* Example: `notFound: '/path/to/404.html'`
* noOpen: `bool` (default: `undefined`)
* Will not open the browser on server start.
* Example: `noOpen: true`

@@ -168,0 +170,0 @@ --------

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc