Skip to content

AshotN/adminjs-feathers

Repository files navigation

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',
})

Example

Example YouTube video

About

Adapter for AdminJS to use FeathersJS services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published