|
1 | | -# FlexNetSim Backend API |
2 | | -# A Flask API for running FlexNetSim network simulations |
| 1 | +# Flex Net Sim Backend API |
| 2 | +# A Flask API for running Flex Net Sim network simulations |
3 | 3 |
|
4 | 4 | from flask import Flask, request, jsonify |
5 | 5 | import subprocess |
@@ -152,14 +152,14 @@ def simulation_help(): |
152 | 152 | Provides API documentation in plain text format. |
153 | 153 | |
154 | 154 | Returns information about available endpoints, parameters, |
155 | | - and example usage for the FlexNetSim API. |
| 155 | + and example usage for the Flex Net Sim API. |
156 | 156 | |
157 | 157 | Returns: |
158 | 158 | Plain text response: API documentation |
159 | 159 | """ |
160 | 160 |
|
161 | 161 | help_message = """\ |
162 | | -FlexNetSim API Documentation |
| 162 | +Flex Net Sim API Documentation |
163 | 163 |
|
164 | 164 | ENDPOINT: /run_simulation |
165 | 165 | METHOD: POST |
@@ -242,8 +242,9 @@ def simulation_help(): |
242 | 242 | compile_success = compile_simulation() |
243 | 243 |
|
244 | 244 | # --- Main Entry Point --- |
245 | | -if not compile_success: |
246 | | - logger.error("Application startup failed: Compilation error. Check logs for details.") |
247 | | -else: |
248 | | - logger.info("Starting FlexNetSim API server...") |
249 | | - app.run(host="0.0.0.0") |
| 245 | +if __name__ == "__main__": |
| 246 | + if not compile_success: |
| 247 | + logger.error("Application startup failed: Compilation error. Check logs for details.") |
| 248 | + else: |
| 249 | + logger.info("Starting Flex Net Sim API server...") |
| 250 | + app.run(host="0.0.0.0") |
0 commit comments