This document describes how to package the AI Admin application as a Windows executable file.
requirements-packaging.txt - Dependencies including PyInstallerpyinstaller_config.spec - PyInstaller configuration filebuild_exe.bat - Batch script to build the executablerun_server.bat - Batch script to run the built executableREADME_packaging.md - This documentationTo build the executable:
build_exe.bat which will:dist folder as AI_Admin\AI_Admin.exeThe application requires a config.json file with the following structure:
{
"database": {
"host": "120.24.39.179",
"port": 3306,
"user": "root",
"password": "TAI@2019#Zjun",
"database_name": "ai_cs",
"charset": "utf8mb4"
},
"server": {
"host": "0.0.0.0",
"port": 9676,
"debug": false
},
"api": {
"prefix": "/api/v1"
}
}
Note: For production deployment, consider changing the debug value to false in the server configuration.
build_exe.bat script to create the executabledist\AI_Admin\ folderAI_Admin folder to your Windows serverconfig.json file is in the same directory as the executablerun_server.bat or execute AI_Admin.exe directly to start the serverOnce running, the application provides the following API endpoints:
GET /health - Health check endpointPOST /api/v1/type/save - Save ContentTypeGET /api/v1/type/get - Get ContentTypePOST /api/v1/content/save - Save ContentGET /api/v1/content/get - Get ContentDELETE /api/v1/content/delete - Delete Contentadmin.html file is excluded from this packaging as specified