This project provides a minimal HTTP service for uploading, downloading, listing, and deleting BPMN files stored in MongoDB.
POST /bpmn/createuploads a BPMN file usingmultipart/form-data, validates it as XML, and stores it in MongoDB.POST /bpmn/getdownloads a stored BPMN file when provided with its identifier.POST /admin/bpmn/listlists stored files with pagination. Protected with HTTP basic authentication.POST /admin/bpmn/deleteremoves a stored file. Also protected with basic authentication.GET /admin/logtails recent service log lines and requires basic authentication. Use the optionalnquery parameter to control the number of lines.- OpenAPI specification available at
docs/openapi.json.
Environment variables:
MONGODB_URI(defaultmongodb://localhost:27017)MONGODB_DB(defaultbpmn_service)PORT(default8080)BASIC_AUTH_USERNAMEandBASIC_AUTH_PASSWORD(both default toadmin)LOG_FILE_PATH(defaultservice.log)
Ensure MongoDB is available and then run:
MONGODB_URI="mongodb://localhost:27017" BASIC_AUTH_USERNAME="admin" BASIC_AUTH_PASSWORD="change-me" go run ./...The service listens on the configured PORT.