UNPKG

431 BPlain TextView Raw
1import { Server } from "@proerd/nextpress/lib/server"
2import { 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
17process.on("unhandledRejection", (...arg: any[]) => {
18 console.error("unhandledRejection", ...arg)
19 process.exit(1)
20})