44*--------------------------------------------------------------------------------------------*/
55import { IModelHost } from "@itwin/core-backend" ;
66import { Logger , LogLevel } from "@itwin/core-bentley" ;
7- import { BentleyCloudRpcManager , HttpServerRequest , HttpServerResponse , IModelReadRpcInterface , IModelTileRpcInterface , RpcManager } from "@itwin/core-common" ;
7+ import { BentleyCloudRpcManager , IModelReadRpcInterface , IModelTileRpcInterface , RpcManager } from "@itwin/core-common" ;
88import { ECSchemaRpcInterface } from "@itwin/ecschema-rpcinterface-common" ;
99import { ECSchemaRpcImpl } from "@itwin/ecschema-rpcinterface-impl" ;
1010import { IModelJsExpressServer } from "@itwin/express-server" ;
@@ -14,7 +14,6 @@ import { AzureClientStorage, BlockBlobClientWrapperFactory } from "@itwin/object
1414import { Presentation } from "@itwin/presentation-backend" ;
1515import { PresentationRpcInterface } from "@itwin/presentation-common" ;
1616import { config } from "dotenv-flow" ;
17- import express from "express" ;
1817import { ChangesRpcImpl } from "./RPC/ChangesRpcImpl" ;
1918import { ChangesRpcInterface } from "./RPC/ChangesRpcInterface" ;
2019
@@ -43,12 +42,8 @@ void (async () => {
4342 { info : { title : "test-app-backend" , version : "v1.0" } } ,
4443 [ IModelReadRpcInterface , IModelTileRpcInterface , PresentationRpcInterface , ChangesRpcInterface , ECSchemaRpcInterface ] ,
4544 ) ;
46- const app = express ( ) ;
45+
4746 const server = new IModelJsExpressServer ( rpcConfig . protocol ) ;
4847 await server . initialize ( port ) ;
4948 console . log ( `Backend (PID ${ process . pid } ) is listening on port ${ port } .` ) ;
50-
51- app . post ( "*" , async ( request : HttpServerRequest , response : HttpServerResponse ) => {
52- await rpcConfig . protocol . handleOperationPostRequest ( request , response ) ;
53- } ) ;
5449} ) ( ) ;
0 commit comments