What is the best way to get started writing a new backend? #105
Replies: 0 comments 7 replies
-
Thanks for your interest in the project! To create your own backend, you can create a new object which satisfies the export const myBackend = {
name: 'myBackend',
isAvailable(): boolean {
return true;
},
options: {
name: {
type: 'string',
required: false,
description: 'The name of the FS',
},
},
create({ name }: TOptions) {
return new TFilesystem(name); // example
},
} as const satisfies Backend<TFilesystem, TOptions>; In this example, You don't need to use You can look at the source for some backends for good examples, like A few things to note about the backend object:
Please let me know if you would like any more information, I'm happy to help! |
Beta Was this translation helpful? Give feedback.
-
So basically what i need is to implement the |
Beta Was this translation helpful? Give feedback.
-
I have another question about zenfs files, when reading/writing files, it is possible to do it in parts? Im trying to implement a backend for remote server storage, but want it to "feel like its local" |
Beta Was this translation helpful? Give feedback.
-
I'm thinking about writing a new custom backend so support my needs, and i need some guidelines about what needs to be done and implemented, etc. Like what files i need to extends from and what i need to export etc to have a working backend.
The actual code for reading/writing data itself i will do myself, i just need some help getting started. A few pointers in the right direction would help me greatly. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions