1 | import { Server } from "@proerd/nextpress/lib/server"
|
2 | import { getContext } from "./context"
|
3 | //
|
4 | ;(async () => {
|
5 | const context = getContext()
|
6 |
|
7 | await context.database.init({
|
8 | currentVersion: 1,
|
9 | async migration() {},
|
10 | })
|
11 |
|
12 | const server = new Server(context)
|
13 |
|
14 | server.run()
|
15 | })()
|
16 |
|
17 | process.on("unhandledRejection", (...arg: any[]) => {
|
18 | console.error("unhandledRejection", ...arg)
|
19 | process.exit(1)
|
20 | })
|