We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f468224 commit 07d7f8cCopy full SHA for 07d7f8c
src/main/services/api/server.ts
@@ -4,6 +4,7 @@ import type { Server } from 'http'
4
import type { Socket } from 'net'
5
import { nanoid } from 'nanoid'
6
import { API_PORT } from '../../config'
7
+import path from 'path'
8
interface ServerWithDestroy extends Server {
9
destroy: Function
10
}
@@ -28,7 +29,7 @@ const enableDestroy = (server: ServerWithDestroy) => {
28
29
30
31
export const createApiServer = () => {
- const db = store.preferences.get('storagePath') + '/db.json'
32
+ const db = path.resolve(store.preferences.get('storagePath') + '/db.json')
33
const app = jsonServer.create()
34
const middlewares = jsonServer.defaults()
35
const router = jsonServer.router(db)
0 commit comments