Module

Node.Restify.Server

Package
purescript-restify
Repository
freqlabs/purescript-restify

#ServerM Source

data ServerM e a

Monad responsible for server related operations (initial setup mostly).

Constructors

Instances

#Server Source

type Server e = ServerM (restify :: RESTIFY | e) Unit

#listenHttp Source

listenHttp :: forall opts e. Port -> opts -> Server e -> RestifyM e Unit

Create a Restify server with the given options, perform the given setup actions, and start it running on the given port.

#listenHttp' Source

listenHttp' :: forall e. Port -> Server e -> RestifyM e Unit

Create a Restify server with the default options, perform the given setup actions, and start it running on the given port.

#apply Source

apply :: forall e. Server e -> Server -> RestifyM e Unit

Apply Server actions to a Restify server.

#http Source

http :: forall opts e. MethodOpts opts => Method -> opts -> Handler e -> Server e

Bind specified handler to handle request matching route and method.

#get Source

get :: forall opts e. MethodOpts opts => opts -> Handler e -> Server e

Shortcut for http GET

#head Source

head :: forall opts e. MethodOpts opts => opts -> Handler e -> Server e

Shortcut for http HEAD

#post Source

post :: forall opts e. MethodOpts opts => opts -> Handler e -> Server e

Shortcut for http POST

#put Source

put :: forall opts e. MethodOpts opts => opts -> Handler e -> Server e

Shortcut for http PUT

#patch Source

patch :: forall opts e. MethodOpts opts => opts -> Handler e -> Server e

Shortcut for http PATCH

#del Source

del :: forall opts e. MethodOpts opts => opts -> Handler e -> Server e

Shortcut for http DEL

#opts Source

opts :: forall opts e. MethodOpts opts => opts -> Handler e -> Server e

Shortcut for http OPTS