interface TemplatedApp { addServerName(hostname,
options): TemplatedApp; any(pattern,
handler): TemplatedApp; close(): TemplatedApp; connect(pattern,
handler): TemplatedApp; del(pattern,
handler): TemplatedApp; domain(domain): TemplatedApp; filter(cb): TemplatedApp; get(pattern,
handler): TemplatedApp; head(pattern,
handler): TemplatedApp; listen(host,
port,
cb): TemplatedApp; listen(port,
cb): TemplatedApp; listen(port,
options,
cb): TemplatedApp; listen_unix(cb,
path): TemplatedApp; missingServerName(cb): TemplatedApp; numSubscribers(topic): number; options(pattern,
handler): TemplatedApp; patch(pattern,
handler): TemplatedApp; post(pattern,
handler): TemplatedApp; publish(topic,
message,
isBinary?,
compress?): boolean; put(pattern,
handler): TemplatedApp; removeServerName(hostname): TemplatedApp; trace(pattern,
handler): TemplatedApp; ws<UserData>(pattern,
behavior): TemplatedApp; } Methods
any
- any(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
connect
- connect(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
del
- del(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
filter
- filter(cb): TemplatedApp
Parameters
cb: ((res, count) => void | Promise<void>)
- (res, count): void | Promise<void>
Returns void | Promise<void>
get
- get(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
head
- head(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
listen
- listen(host, port, cb): TemplatedApp
Parameters
port: number
cb: ((listenSocket) => void | Promise<void>)
- (listenSocket): void | Promise<void>
Returns void | Promise<void>
- listen(port, cb): TemplatedApp
Parameters
port: number
cb: ((listenSocket) => void | Promise<void>)
- (listenSocket): void | Promise<void>
Returns void | Promise<void>
- listen(port, options, cb): TemplatedApp
Parameters
port: number
cb: ((listenSocket) => void | Promise<void>)
- (listenSocket): void | Promise<void>
Returns void | Promise<void>
listen_unix
- listen_unix(cb, path): TemplatedApp
Parameters
cb: ((listenSocket) => void | Promise<void>)
- (listenSocket): void | Promise<void>
Returns void | Promise<void>
missingServerName
- missingServerName(cb): TemplatedApp
Parameters
cb: ((hostname) => void)
- (hostname): void
Returns void
numSubscribers
- numSubscribers(topic): number
Returns number
options
- options(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
patch
- patch(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
post
- post(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
publish
- publish(topic, message, isBinary?, compress?): boolean
Parameters
Optional
isBinary: boolean
Optional
compress: boolean
Returns boolean
put
- put(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
trace
- trace(pattern, handler): TemplatedApp
Parameters
handler: ((res, req) => void | Promise<void>)
- (res, req): void | Promise<void>
Returns void | Promise<void>
TemplatedApp is either an SSL or non-SSL app. See App for more info, read user manual.