Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/LiveDirectory.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const LiveAssets = new LiveDirectory('/var/www/website/files', {
// For example, the below is a simple dot-file ignore match which will prevent any files starting with a dot from being loaded into live-directory
return path.startsWith('.');
},
}
},

// Optional: You can customize how LiveDirectory caches content under the hood
cache: {
Expand Down
2 changes: 1 addition & 1 deletion docs/Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Below is a breakdown of the `Response` component which is an **extended** `Writa
* **Note** the `total_size` is an **optional** number in `bytes` which can be specified if you need a `content-length` header on the receiver side.
* **Note** you must do your own error handling on the readable stream to prevent triggering the global error handler.
* `send(String|Buffer|ArrayBuffer?: body)`: Writes specified body and sends response.
* **Returns** a `Boolean` in which `false` signifies body was not fully sent due to built up backpressure.
* **Returns** current `Response` object to facilitate chain calls.
* `json(Object: body)`: Alias of `send()`. Sets mime type to `json` and sends response.
* `jsonp(Object: body, String?: name)`: Alias of `send()`. Sets mime type to `js` and sends response.
* **Note!** This method uses `callback` query parameter as callback name by default if `name` parameter is not specified.
Expand Down