Simple Express server for testing PCRS (Pharmacy Claims Reimbursement System) integrations.
# Install dependencies
npm install
# Start the server
npm startServer will run on: http://localhost:3001 β
GET /portal/pharmacy-3rd-gen/sec/p2p/download/exception?filename=example.xml- Downloads files from the
public/folder - Supports:
.xml,.zipfiles - Returns proper Content-Type headers
POST /portal/pharmacy-3rd-gen/sec/p2p/3.4/upload/file- File upload endpoint (max 100MB)
- Field name:
pharmacyFile - Files saved to
uploads/folder with original names - Returns XML response (currently always returns error response)
OPTIONS *- Handles CORS preflight requests
- Returns HTTP 200
- β CORS enabled for cross-domain requests
- β File uploads with multer (100MB limit)
- β File downloads from public folder
- β Proper Content-Type headers (XML/ZIP)
- β No-cache headers for fresh responses
- β
Auto-creates
public/anduploads/folders - β Simple and lightweight
βββ server.js # Main server file π―
βββ package.json # Dependencies & scripts π
βββ public/ # Downloadable files folder π
βββ uploads/ # Uploaded files folder π€
βββ README.md # This file π
# Download XML file
curl "http://localhost:3001/portal/pharmacy-3rd-gen/sec/p2p/download/exception?filename=test.xml"
# Download ZIP file
curl "http://localhost:3001/portal/pharmacy-3rd-gen/sec/p2p/download/exception?filename=data.zip"# Upload file using curl
curl -X POST http://localhost:3001/portal/pharmacy-3rd-gen/sec/p2p/3.4/upload/file \
-F