eclipse-sirius / sirius-web

Reusable frontend and backend components for Sirius Web
https://eclipse.dev/sirius/sirius-web.html
Eclipse Public License 2.0
67 stars 46 forks source link

Sample application shows 404 error #1646

Open AresEkb opened 1 year ago

AresEkb commented 1 year ago

Steps to reproduce

  1. Clone and build sources
    git clone https://github.com/eclipse-sirius/sirius-components.git
    cd sirius-components
    npm ci
    npx turbo run build
    cd packages
    mvn clean install
  2. Fix bug in docker-compose.yml
    cd sirius-web/backend/sirius-web-sample-application

    Add build context to app in docker-compose.yml:

    app:
    image: siriusweb
    build:
      context: .
  3. Run sample application:
    docker compose up --build
  4. Open http://localhost:8080 in browser. Get 404 error
  5. Open http://localhost:8080/graphiql/index.html in browser. Works fine. So it seems the application is started. There are no any errors in log as well

If I run it without docker, then I get the same error.

Expected behavior

Show starting page on http://localhost:8080

Actual behavior

Get 404 error on http://localhost:8080

AresEkb commented 1 year ago

Oh, it was simple.

Between frontend and backend build one must copy frontend to backend:

cp -R packages/sirius-web/frontend/sirius-web/dist packages/sirius-web/backend/sirius-web-frontend/src/main/resources/static

Maybe just README.md and docker-compose.yml can be fixed.