adminjs-feathers
v0.1.7
Published
An adapter to connect AdminJS to FeathersJS
Downloads
37
Readme
adminjs-feathers
An adapter to connect AdminJS to FeathersJS
Usage
Register the adapter
AdminJS.registerAdapter({ Database, Resource })
Create a resource
export const CompanyResource: ResourceWithOptions = {
resource: {
service: app.service('company'),
schema: companySchema,
options: {
//Resource level options
applyDefaults: true,
databaseName: 'FeathersJS',
treatNullableAsOptional: true,
provider: 'adminJS',
},
},
options: {},
}
Load your resource into AdminJS
const admin = new AdminJS({
resources: [CompanyResource],
rootPath: '/admin',
})
Options
Since v0.1.0 the following options are available as both global and resource level options
| Property | Default | Version | |-------------------------|--------------|---------| | applyDefaults | true | 0.10.0 | | treatNullableAsOptional | true | 0.10.0 | | provider | 'adminJS' | 0.10.0 | | databaseName | 'FeathersJS' | 0.10.0 |
Global options example
globalOptions.set({
applyDefaults: true,
databaseName: 'FeathersJS',
treatNullableAsOptional: true,
provider: 'adminJS',
})