Deploy the learner app and hub
Build and run the two Next.js applications.
- 1
Set the API address
In each app, set
NEXT_PUBLIC_API_BASE_URLto the API, for examplehttps://femnet-api.duckdns.org/api/v1, in.envor your host's environment settings. It is baked in at build time. - 2
Build
Use Node.js 20 or newer. In
femnet-lms-fendrunpnpm installthenpnpm build. Infemnet-facilitator-fendrun the same commands. - 3
Run
Start each app with
pnpm startbehind your web server or process manager, or deploy it to a Next.js host. Each app needs its own domain with HTTPS. - 4
Allow the domains on the backend
Add both domains to
DJANGO_CORS_ALLOWED_ORIGINSandDJANGO_CSRF_TRUSTED_ORIGINS, and setSHOP_CALLBACK_URLtohttps://<learner-app-domain>/shop/checkout/return. Restart the backend. - 5
Check
Sign in to both apps. Learners need to reload the installed app once to get the new version.
