How to use the @ng-apimock/core.middleware function in @ng-apimock/core

To help you get started, we’ve selected a few @ng-apimock/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rickvandermey / angular-starterkit / mockserver / mockserver.js View on Github external
return require(paths).handle(
					scenario,
					request,
					response,
					variables,
					req,
				);
			}
		}
	});

	next();
});

// Bind the mock middleware to the express server
app.use(apimock.middleware);

// Bind a route so you can modify the running mock server
app.use('/mocking', express.static(devInterface));

// Simple feedback the server is actually running
app.listen(app.get('port'), function() {
	console.log('app running on port', app.get('port'));
});

@ng-apimock/core

ng-apimock core module

MIT
Latest version published 3 months ago

Package Health Score

79 / 100
Full package analysis