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 348d181 commit e1934ceCopy full SHA for e1934ce
src/index.ts
@@ -11,10 +11,6 @@ import { randomUUID } from "crypto";
11
import {normalize as normalizePath} from 'path'
12
import CONSTANTS from './constants'
13
14
-process.on('exit', () => {
15
- DBDestroySignal.abort('Process is exiting')
16
-})
17
-
18
export async function createDB(opts?: ServerOptions) {
19
const defaultOptions: InternalServerOptions = {
20
dbName: 'dbdata',
src/libraries/AbortSignal.ts
@@ -1,3 +1,7 @@
1
const DBDestroySignal = new AbortController();
2
3
+process.on('beforeExit', () => {
4
+ DBDestroySignal.abort('Process is exiting')
5
+})
6
+
7
export default DBDestroySignal;
0 commit comments