本文整理汇总了TypeScript中feathers-hooks.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor() {
this.socket = io(HOST);
this._app = feathers()
.configure(socketio(this.socket))
.configure(hooks())
.configure(authentication({ storage: localstorage }));
}
示例2: constructor
constructor() {
super();
this.socket = io(HOST);
this._app = feathers()
.configure(socketio(this.socket))
.configure(hooks())
}
示例3: constructor
constructor() {
this._app = feathers()
.configure(rest(HOST)
.superagent(superagent))
.configure(hooks()) // Configure feathers-hooks
.configure(authentication({storage: localStorage}));
}
示例4: require
import {services} from './services/index';
import {middleware} from './middleware/index';
const path = require('path');
const serveStatic: Function = require('feathers').static;
const favicon = require('serve-favicon');
const compress = require('compression');
const cors = require('cors');
const feathers = require('feathers');
const configuration = require('feathers-configuration');
const hooks = require('feathers-hooks');
const socketio = require('feathers-socketio');
export const app = feathers();
app.configure(configuration(path.join(__dirname, '..', '..')));
app.use(compress({}))
.options('*', cors())
.use(cors())
.use(favicon(path.join(app.get('public'), 'favicon.ico')))
.use('/public', serveStatic(app.get('public')))
.use('/', serveStatic(app.get('public')))
.configure(hooks())
.configure(socketio())
.configure(services)
.configure(middleware);