@@ -53,39 +53,6 @@ async function initializeSystem(): Promise<{
5353 gptController : new GPTController ( GPTModel . GPT4Turbo ) ,
5454 } ;
5555}
56- // initializeSystem().then(({ dbController, gptController }) => {
57- // app.use("/", exampleRouter);
58- // //app.use("/getTable", tableRouter)
59- // app.use("/api/dataRequest", cascadeRouter(dbController));
60- // //app.use("/api/adminRequest", adminRouter(dbController, gptController));
61- // //FOR QUICKLY TESTING A PAPER: Uncomment paper to test it. Run "localhost:3000/parse" in a browser to parse the paper and see results in console
62- // // app.use("/parse", () => {
63- // // gptController.runGPTAnalysis(["./test/testfiles/SEE_in-flight_data_for_two_static_32KB_memories_on_high_earth_orbit.pdf"]);
64- // // // gptController.runGPTAnalysis(["./test/testfiles/A_radiation_tolerant_video_camera_for_high_total_dose_environments.pdf"]);
65- // // // gptController.runGPTAnalysis(["./test/testfiles/Radiation_effects_predicted_observed_and_compared_for_spacecraft_systems.pdf"]);
66- // // // gptController.runGPTAnalysis(["./test/testfiles/Solar_flare_proton_environment_for_estimating_downtime_of_spacecraft_CCDs.pdf"]);
67- // // // gptController.runGPTAnalysis(["./test/testfiles/slvk121.pdf"]);
68- // // });
69-
70- // (async () => {
71- // try {
72- // await initializeDatabase(); // Call it once
73- // console.log("Database initialized successfully.");
74- // } catch (error) {
75- // console.error("Failed to initialize the database:", error);
76- // }
77- // })();
78-
79- // app.listen(PORT, () => {
80- // console.log(`Server is running on ${PORT}`);
81-
82- // // Close the database when the app is shutting down
83- // process.on("exit", () => {
84- // dbController.closeDB();
85- // console.log("Database connection closed.");
86- // });
87- // });
88- // });
8956
9057( async ( ) => {
9158 try {
@@ -102,11 +69,9 @@ async function initializeSystem(): Promise<{
10269
10370 //for testing
10471
72+ /*
10573 app.get("/test2-gpt", async (req, res) => {
10674 try {
107- //const pdfFile = "./test/Radiation_effects_predicted_observed_and_compared_for_spacecraft_systems.pdf";
108- //const pdfFile = "./test/SEE_in-flight_data_for_two_static_32KB_memories_on_high_earth_orbit.pdf"; // Replace with actual file path
109- //const pdfFile = "./test/Single-Event_Effects_Measurements_on_COTS_Electronic_Devices_for_Use_on_NASA_Mars_Missions.pdf";
11075 const pdfFile = ["./test/Review_of_TID_Effects_Reported_in_ProASIC3_and_ProASIC3L_FPGAs_for_3D_PLUS_Camera_Heads.pdf"];
11176 const pdfFiles = [
11277 "./test/Radiation_effects_predicted_observed_and_compared_for_spacecraft_systems.pdf",
@@ -130,18 +95,7 @@ async function initializeSystem(): Promise<{
13095 res.status(500).json({ error: "GPT analysis failed", details: error });
13196 }
13297 });
133- app . get ( "/test-gpt" , async ( req , res ) => {
134- try {
135- console . log ( "Initializing GPTController..." ) ;
136- const gptController = new GPTController ( GPTModel . GPT4O ) ;
137-
138- console . log ( "Running GPT Analysis..." ) ;
139-
140- } catch ( error ) {
141- console . error ( "Error during GPT analysis:" , error ) ;
142- res . status ( 500 ) . json ( { error : "GPT analysis failed" , details : error } ) ;
143- }
144- } ) ;
98+ */
14599
146100 app . listen ( PORT , ( ) => {
147101 console . log ( `Server is running on ${ PORT } ` ) ;
0 commit comments