forked from esm-dev/esm.sh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.example.jsonc
85 lines (66 loc) · 2.96 KB
/
config.example.jsonc
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
// The port to listen server on for HTTP, default is 8080.
"port": 8080,
// The port to listen server on for HTTPs, default is 0 (disabled). Change to 443 if you want to enable it.
// You don't need to provide a certificate, it will generate automatically by autocert.
// Note: Docker users needs to provide tls certificate.
"tlsPort": 0,
// The secret token to validate the `Authorization: Bearer $secret` header of requests, default is disabled.
"authSecret": "",
// The build max concurrency, default is `runtime.NumCPU()`
"buildConcurrency": 0,
// The max waiting time for the build to complete, default is 30 seconds.
"buildWaitTimeout": 30,
// The work directory for the server app, default is "~/.esmd".
"workDir": "~/.esmd",
// The cache source, default is "memory:default".
// You can also implement your own cache by implementing the `Cache` interface
// in https://github.com/esm-dev/esm.sh/blob/main/server/storage/cache.go
"cache": "memory:default",
// The database source, default is "bolt:~/.esmd/esm.db".
// You can also implement your own database by implementing the `DataBase` interface
// in https://github.com/esm-dev/esm.sh/blob/main/server/storage/db.go
"database": "bolt:~/.esmd/esm.db",
// The file storage source, default is "local:~/.esmd/storage".
// You can also implement your own file storage by implementing the `FileSystem` interface
// in https://github.com/esm-dev/esm.sh/blob/main/server/storage/fs.go
"storage": "local:~/.esmd/storage",
// The log directory, default is "~/.esmd/log".
"logDir": "~/.esmd/log",
// The log level, default is "info", you can also set it to "debug" to enable debug logs.
"logLevel": "info",
// The origin of CDN, default is using the origin of the request.
// Use to fix origin with reverse proxy, for examle "https://esm.sh"
"cdnOrigin": "",
// The base path of CDN, default is "/".
"cdnBasePath": "/",
// The npm registry, default is "https://registry.npmjs.org/".
"npmRegistry": "https://registry.npmjs.org/",
// The scope applied to the npm registry. This will ensure only packages
// with this scope get downloaded from the registry, default is empty.
// Default behavior is to fetch all packages from the npm registry.
"npmRegistryScope": "@my-scope",
// The npm token for private packages, default is empty.
"npmToken": "",
// These two fields are used for basic authentication towards a private
// package registry, default for both is empty.
"npmUser": "",
"npmPassword": "",
// Disable gzip/brotli compression, default is false.
"disableCompression": false,
// The list to ban some packages or scopes.
"banList": {
"packages": ["@some_scope/package_name"],
"scopes": [{
"name": "@your_scope",
"excludes": ["package_name"]
}]
},
// The list to only allow some packages or scopes.
"allowList": {
"packages": ["@some_scope/package_name"],
"scopes": [{
"name": "@your_scope"
}]
}
}