Initialize a new enforcer
masterTo start using Casbin, create a new enforcer instance by providing a model configuration file and a policy file. You can also initialize an enforcer using a database via adapters (see Policy Persistence documentation).
// For Node.js:
const { newEnforcer } = require('casbin');
// For browser:
// import { newEnforcer } from 'casbin';
const enforcer = await newEnforcer('basic_model.conf', 'basic_policy.csv');