May 2018
Intermediate to advanced
512 pages
11h 3m
English
Before you're able to use your server from your application, you will need to configure it to allow for Cross-Origin Resource Sharing (CORS) so that your Angular application hosted on http://localhost:5000 can communicate with your mock server hosted on http://localhost:3000:
$ npm i cors
server/index.js...var cors = ...app.use(cors())// Initialize the Swagger middlewareswaggerTools.initializeMiddleware(swaggerDoc, function(middleware) {...
Read now
Unlock full access