Quick Start
- Copy the controller:
cp EnergySyc_EMS_ES100Cx12S/laravel_dev_help/EmsBackendController.php.snippet /path/to/ems-frontend/app/Http/Controllers/EmsBackendController.php
-
Merge the service configuration and routes from the snippets.
-
Add this to Laravel
.env:
EMS_BACKEND_URL=http://ems-backend:8080
EMS_BACKEND_TOKEN=the-same-value-as-EMS_SETTINGS_API_TOKEN
EMS_BACKEND_TIMEOUT=10
- Clear Laravel caches:
php artisan config:clear
php artisan route:clear
- Verify routes:
php artisan route:list --path=api/ems
- Verify container connectivity from
ems-frontend:
curl -H "Authorization: Bearer ${EMS_BACKEND_TOKEN}" \
http://ems-backend:8080/api/v1/ems/health
- Connect the frontend UI to
/api/ems/settingsand/api/ems/readings.
For complete details, read api_contract.md, frontend_usage.md, and deployment_and_testing.md in this folder.