mirror of
https://github.com/coder/code-server.git
synced 2025-08-02 05:52:25 +08:00
Convert routes to Express
This commit is contained in:
@ -4,6 +4,7 @@ import { promises as fs } from "fs"
|
||||
import http from "http"
|
||||
import * as httpolyglot from "httpolyglot"
|
||||
import { DefaultedArgs } from "./cli"
|
||||
import { handleUpgrade } from "./http"
|
||||
|
||||
/**
|
||||
* Create an Express app and an HTTP/S server to serve it.
|
||||
@ -38,6 +39,8 @@ export const createApp = async (args: DefaultedArgs): Promise<[Express, http.Ser
|
||||
}
|
||||
})
|
||||
|
||||
handleUpgrade(app, server)
|
||||
|
||||
return [app, server]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user