Skip to content

Commit 8cb5149

Browse files
committed
better default for hosting and storage providers
1 parent ffe815f commit 8cb5149

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ node_modules
1111
old
1212
dist/
1313
.silex/
14+
silex/
1415
.env

src/ts/server/config.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import { FsStorage } from './connectors/FsStorage'
3434
import { Connector } from './connectors/connectors'
3535
import { ConnectorType } from '../types'
3636
import { FsHosting } from './connectors/FsHosting'
37-
import { tmpdir } from 'os'
3837

3938
/**
4039
* Config types definitions
@@ -177,13 +176,13 @@ export class ServerConfig extends Config {
177176
// Add default storage connectors
178177
if (!this.storageConnectors.length) {
179178
this.addStorageConnector(new FsStorage(null, {
180-
path: process.env.SILEX_FS_ROOT || join(tmpdir(), '/silex/storage'),
179+
path: process.env.SILEX_FS_ROOT || join(process.cwd(), '/silex/storage'),
181180
}))
182181
}
183182
// Add default hosting connectors
184183
if (!this.hostingConnectors.length) {
185184
this.addHostingConnector(new FsHosting(null, {
186-
path: process.env.SILEX_FS_HOSTING_ROOT || join(tmpdir(), '/silex/hosting'),
185+
path: process.env.SILEX_FS_HOSTING_ROOT || join(process.cwd(), '/silex/hosting'),
187186
}))
188187
}
189188
}

0 commit comments

Comments
 (0)