Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const feathers = require('@feathersjs/feathers');
- const express = require('@feathersjs/express');
- const swagger = require('feathers-swagger');
- const app = express(feathers());
- // Turn on JSON body parsing for REST services
- app.use(express.json())
- // Turn on URL-encoded body parsing for REST services
- app.use(express.urlencoded({ extended: true }));
- // Set up REST transport using Express
- app.configure(express.rest());
- app.configure(swagger({
- docsPath: '/docs',
- info: {
- title: 'A test',
- description: 'A description'
- }
- // Set up an error handler that gives us nicer errors
- app.use(express.errorHandler());
- // Start the server on port 3030
- app.listen(3030);
Add Comment
Please, Sign In to add comment