-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmod.js
More file actions
41 lines (38 loc) · 744 Bytes
/
mod.js
File metadata and controls
41 lines (38 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { R } from './deps.js'
import adapter from './adapter.js'
const { mergeRight } = R
/**
* hyper63 fs plugin for the storage port. This plugin is an adapter that
* uses the file system to store files for the storage port in hyper63.
*
* ## Setup
*
* ``` sh
* yarn add @hyper63/adapter-fs
* ```
*
* ``` js
* const fs = require('@hyper63/adapter-fs')
*
* module.exports = {
* adapters: [
* ...
* { port: 'storage', plugins: [fs({dir: './storage'})]}
* ]
* }
* ```
*
* ## Usage
*
* see https://purple-elephants.surge.sh
*
* storage section
*/
export default function (config) {
return ({
id: 'fs',
port: 'storage',
load: mergeRight(config),
link: ({ dir }) => () => adapter(dir),
})
}