build: move larger scripts into tools dir in workspace (#10653)
Having the `scripts` dir re-use all packages from the top-level was getting quite unwieldy. Created new `tools` directory that is part of the workspace. Packages are exported with the `@tools` package namespace.
This commit is contained in:
@@ -80,13 +80,13 @@ const app = nextImport({
|
||||
|
||||
const handle = app.getRequestHandler()
|
||||
|
||||
let resolveServer
|
||||
let resolveServer: () => void
|
||||
|
||||
const serverPromise = new Promise((res) => (resolveServer = res))
|
||||
const serverPromise = new Promise<void>((res) => (resolveServer = res))
|
||||
|
||||
void app.prepare().then(() => {
|
||||
createServer(async (req, res) => {
|
||||
const parsedUrl = parse(req.url, true)
|
||||
const parsedUrl = parse(req.url || '', true)
|
||||
await handle(req, res, parsedUrl)
|
||||
}).listen(port, () => {
|
||||
resolveServer()
|
||||
|
||||
Reference in New Issue
Block a user