#icontext
Usage
Classic ContextFactory
import { ContextFactory } from 'icontext';
const contextFactory = new ContextFactory({});
await contextFactory.build();
Sync call on application start
Add to script or next.config.js
:
Warining: uses process.swapwnSync, in all possible cases prefer async version instead
const { buildSync } = require('icontext');
buildSync();
Using --require
node -r icontext/config script.js
Migration from @ilb/node_context:
npm uninstall @ilb/node_context @ilb/node_ldap
npm install icontext
grep -Rl @ilb/node_context src|xargs sed -i "s^ContextFactory from '@ilb/node_context'^{ ContextFactory } from 'icontext'^"