- 服务器 Server
- server([options])
- Server options
- 服务器属性 Server properties
- server.auth.default(options)
- server.auth.scheme(name, scheme)
- server.auth.strategy(name, scheme, [options])
- await server.auth.test(strategy, request)
- await server.auth.verify(request)
- server.bind(context)
- server.cache(options)
- await server.cache.provision(options)
- server.control(server)
- server.decoder(encoding, decoder)
- server.decorate(type, property, method, [options])
- server.dependency(dependencies, [after])
- server.encoder(encoding, encoder)
- server.event(events)
- await server.events.emit(criteria, data)
- server.events.on(criteria, listener)
- server.events.once(criteria, listener)
- await server.events.once(criteria)
- server.expose(key, value)
- server.expose(obj)
- server.ext(events)
- server.ext(event, method, [options])
- await server.initialize()
- await server.inject(options)
- server.log(tags, [data, [timestamp]])
- server.lookup(id)
- server.match(method, path, [host])
- server.method(name, method, [options])
- server.method(methods)
- server.path(relativeTo)
- await server.register(plugins, [options])
- server.route(route)
- server.rules(processor, [options])
- await server.start()
- server.state(name, [options])
- server.states.add(name, [options])
- await server.states.format(cookies)
- await server.states.parse(header)
- await server.stop([options])
- server.table([host])
- Route options
- route.options.app
- route.options.auth
- route.options.bind
- route.options.cache
- route.options.compression
- route.options.cors
- route.options.description
- route.options.ext
- route.options.files
- route.options.handler
- route.options.id
- route.options.isInternal
- route.options.json
- route.options.jsonp
- route.options.log
- route.options.notes
- route.options.payload
- route.options.plugins
- route.options.pre
- route.options.response
- route.options.rules
- route.options.security
- route.options.state
- route.options.tags
- route.options.timeout
- route.options.validate
- Request lifecycle
- 请求
- 插件
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
server([options])
创建一个新的 server 对象:
Creates a new server object where:
options
- (可选) 一个 server 可配置对象 .
const Hapi = require('hapi'); const server = Hapi.server({ load: { sampleInterval: 1000 } });
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论