Title

Global

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.

View Source filetype.js, line 8

Filetype

string

Type Definitions

object

# WebServerOptions

WebServer's options.

Properties:
Name Type Attributes Default Description
options object <optional>
directory string <optional>
./public/

The directory to load the file.

acceptonlyget boolean <optional>
true

Only accepts get request.

notfound string <optional>
default html code

Html code to respond on not found.

req405error string <optional>
default html code

Html code to respond on post, put, delete and etc.

port Number <optional>
3000

Port to host the page.

View Source WebServer.js, line 5