// Initializes the `user` service on path `/user`
const createService = require('feathers-sequelize');
const createModel = require('../../models/user.model');
const hooks = require('./user.hooks');
module.exports = function (app) {
const Model = createModel(app);
const paginate = app.get('paginate');
const options = {
Model,
paginate
};
// Initialize our service with any options it requires
// app.use('/user', createService(options));
const user = createService(options)
user.docs = {
description: 'A service to send and receive messages',
}
app.use('/user', user)
};
in app.js
app.configure(swagger({
docsPath: '/docs',
uiIndex: true, // no need for src/docs.html
info: {
title: 'A test',
description: 'A description'
}
}));
console.log (app.docs);
feathers generate service
in file user.service.js
in app.js
console.log result
http://localhost:3030/docs/?url=/docs
No operations defined in spec!