Guest User

Untitled

a guest
May 26th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. const feathers = require('@feathersjs/feathers');
  2. const express = require('@feathersjs/express');
  3. const swagger = require('feathers-swagger');
  4.  
  5. const app = express(feathers());
  6. // Turn on JSON body parsing for REST services
  7. app.use(express.json())
  8. // Turn on URL-encoded body parsing for REST services
  9. app.use(express.urlencoded({ extended: true }));
  10. // Set up REST transport using Express
  11. app.configure(express.rest());
  12.  
  13. app.configure(swagger({
  14. docsPath: '/docs',
  15. info: {
  16. title: 'A test',
  17. description: 'A description'
  18. }
  19.  
  20. // Set up an error handler that gives us nicer errors
  21. app.use(express.errorHandler());
  22.  
  23. // Start the server on port 3030
  24. app.listen(3030);
Add Comment
Please, Sign In to add comment