Skip to content

Latest commit

 

History

History
117 lines (84 loc) · 2.05 KB

README.md

File metadata and controls

117 lines (84 loc) · 2.05 KB

Leihs Inventory

TODOs

  1. Move/upgrade from depstar to tools.build
  2. Properly setup static resouces with cache-busting; wrap-resource in leihs.inventory.server.swagger-api, see exemplary use of leihs.core.http-cache-buster2 in leihs-admin;
  3. Deliver SPA depending on accept headers, see leihs-admin
  4. Add container build test; see leihs-admin
  5. Add deploy role in this repository, madek-api-v2 for example

Development

Start server

# to build latest FE and run BE
npm inst
npm run build

bin/dev-run-backend

Start client

Install and start:

bin/dev-run-frontend

For a quicker start when already installed before:

npm run dev

Sync Locales

npx i18next-locales-sync -p de -s fr es en -l resources/public/inventory/static/locales/ --spaces 2 --useEmptyString true

Formatting Code

Clojure(Script) formatting

Use ./bin/cljfmt check and ./bin/cljfmt fix.

From vim you can use :! ./bin/cljfmt fix % to format the current file.

Ruby formatting

Use standardrb and standardrb --fix.

Production build

See ./bin/build

Development-Setups

Frontend Development

  1. /inventory
    http://localhost:8080/

    # leihs/inventory
    ./bin/dev-run-backend

Standalone

  1. /inventory
    http://localhost:3260/
    See SESSION_HANDLING_ACTIVATED?
    # leihs/inventory
    ./bin/dev-run-backend

Setup with proxy/my/inventory

  1. Proxy
    http://localhost:3200/
    # leihs/integration-tests
    ./bin/start-reverse-proxy
  2. /inventory
    http://localhost:3260/
    # leihs/inventory
    ./bin/dev-run-backend
  3. /my (provides simple login)
    http://localhost:3240/
    # leihs/my
    ./bin/dev-run-backend
  4. Legacy (not required)
    # leihs/legacy
    ./bin/rails server -p 3210

Create artifact & deploy manually

./bin/build

scp leihs-inventory.jar <user>@<server>:/leihs/inventory/leihs-inventory.jar

systemctl restart leihs-inventory.service