Methods
# GetFileType(Filename) → {string}
Get content type of the file name for http header.
Parameters:
Name | Type | Description |
---|---|---|
Filename |
string | Filename to get header content type. |
Filetype
string
Example
const { GetFileType } = require("lite-web-server")
var filetype = GetFileType("main.js")
# SafeUrl(stringopt) → {string}
removes /..
from url.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
string |
URL |
<optional> |
- URL
string
Example
const { SafeUrl } = require("lite-web-server");