This project was generated with Angular CLI.
Generally, LU-Explorer needs a datasource, which is provided by the Paradox Server. That server provides the data from the game database to the web interface, which makes it a core component of this app.
This needs a paradox.toml config file in the working directory – a minimal example is provided here. The most important part is to point the explorer_spa key to the docs folder in this repo and the cdclient and locale key to a copy of CDClient.fdb and locale.xml respectively.
-
install
npmandcargo(via https://rustup.rs) -
install the API server binary with
$ cargo install --git https://github.com/Xiphoseer/lu-res-api-server.git --branch main
-
Then, clone this repo and create
lu-resandclientfolders next to it$ git clone https://github.com/Xiphoseer/lu-explorer.git $ mkdir lu-res client
-
Put at least
locale/locale.xmlandres/cdclient.fdbfrom an LU client into thisclientfolder -
You can now build the
lu-explorerweb-app continuously with$ cd lu-explorer $ npm install $ ng build --watch -
Finally, run the API server, which will also serve the web-app
$ RUST_LOG=info paradox-server
For now, you need to restart that server whenever you change the lu-explorer source.
(Issue #1)
The alternative is to:
- point
data.apiUrlinsrc/environments/environment.tsto an existing API server. - point
/lu-resinsrc/proxy.conf.jsonto a matching version oflu-res.
Then run
$ npm install
$ ng serve- Build:
docker build -t paradox-server - Deploy:
Replace the paths on the left of the mappings to reflect your system:
docker run -it --rm \
--name paradox-server \
-e DOMAIN=your.domain.tld \
-e USERNAME=<username> \
-e PASSWORD=<password> \
-v /path/to/client:/luclient \
-v /path/to/cache:/cache/lu-res \
-p 3030:3030 \
paradox-server
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the docs/ directory. Use the --configuration production flag for a production build. For building to github pages also use --base-href=/lu-explorer/.
Usually, the ng build --configuration production command is used.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.