Deploying behind Nginx
In production, the Casdoor backend serves the frontend static files and the API. You can put Nginx in front of it to proxy all traffic for your domain to the backend port.
1. Build frontend static files
With Casdoor cloned and configured (see Server installation), build the frontend:
- Yarn
- npm
yarn install && yarn run build
npm install && npm run build
2. Run the backend
go run main.go
Or build and run:
go build && ./casdoor