File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ const __dirname = dirname(__filename)
5959const port = 8085
6060const app : Application = express ( )
6161
62+ // Commit ID variable (declared here to avoid TDZ issues)
63+ let commitId = ''
64+
6265// Initialize Redis client.
6366console . log ( `--- Redis setup -------------------------------------------------` )
6467process . env . VITE_OBP_REDIS_URL
@@ -189,7 +192,7 @@ let instance: any
189192 // Try to get the commit ID
190193 commitId = execSync ( 'git rev-parse HEAD' , { encoding : 'utf-8' } ) . trim ( )
191194 console . log ( 'Current Commit ID:' , commitId )
192- } catch ( error ) {
195+ } catch ( error : any ) {
193196 // Log the error but do not terminate the process
194197 console . error ( 'Warning: Failed to retrieve the commit ID. Proceeding without it.' )
195198 console . error ( 'Error details:' , error . message )
@@ -212,9 +215,6 @@ let instance: any
212215} ) ( )
213216
214217// Export instance for use in other modules
215- export { instance }
216-
217- // Commit ID variable
218- export let commitId = ''
218+ export { instance , commitId }
219219
220220export default app
You can’t perform that action at this time.
0 commit comments