How to use the awilix.InjectionMode.PROXY function in awilix

To help you get started, we’ve selected a few awilix 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 SelfKeyFoundation / Identity-Wallet / src / common / context.js View on Github external
export const configureContext = thread => {
	const container = createContainer({
		injectionMode: InjectionMode.PROXY
	});

	registerCommonServices(container, thread);

	if (thread === 'main') {
		require('../main/context').registerMainServices(container);
	}
	if (thread === 'renderer') {
		require('../renderer/context').registerRendererServices(container);
	}

	return container;
};