I am adding port from tsconfig file as
{
"extends": "./node_modules/@bentley/build-tools/tsconfig-base.json",
"portNo":3001,
"compilerOptions": {
"skipLibCheck": true,
"outDir": "./lib",
"baseUrl": "./node_modules/",
"types": [
"node"
]
},
"include": [
"./src/*/.ts"
]
}
and add in main.ts
*import as configData from "../tsconfig.json";**
Getting following error
Cannot find module '../tsconfig.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
want to use port mentined in tsconfig and use for server start
tsconfig.json is used to configure the TypeScript compiler. For configuring the server at runtime, I'd suggest either adding another command line argument or something in configuration.ts.
I am adding port from tsconfig file as { "extends": "./node_modules/@bentley/build-tools/tsconfig-base.json", "portNo":3001, "compilerOptions": { "skipLibCheck": true, "outDir": "./lib", "baseUrl": "./node_modules/", "types": [ "node" ] }, "include": [ "./src/*/.ts" ] }
and add in main.ts *import as configData from "../tsconfig.json";** Getting following error Cannot find module '../tsconfig.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
want to use port mentined in tsconfig and use for server start