mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
[misc] bulk replace localhost with 127.0.0.1 GitOrigin-RevId: d238f3635302e8ff5500d611108c4d1bef216726
16 lines
413 B
JavaScript
16 lines
413 B
JavaScript
import { createServer } from '../../../../app/js/server.js'
|
|
import { promisify } from 'util'
|
|
|
|
export { db } from '../../../../app/js/mongodb.js'
|
|
|
|
let serverPromise = null
|
|
|
|
export async function ensureRunning() {
|
|
if (!serverPromise) {
|
|
const { app } = await createServer()
|
|
const startServer = promisify(app.listen.bind(app))
|
|
serverPromise = startServer(3010, '127.0.0.1')
|
|
}
|
|
return serverPromise
|
|
}
|