Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ xtc build -o out chess-game/db/src/main/x/chessDB.x
xtc build -o out -L out -r chess-game/app/webapp chess-game/app/src/main/x/chess.x
# chess.examples.org is @WebApp — needs the XQIZ.IT platform to host

# Welcome (requires npm build in welcome/webapp/ first)
# Welcome (build the React frontend first: cd welcome/webapp && npm install && npm run build)
xtc build -o out -r welcome/webapp welcome/src/main/x/*.x
xtc run -L out welcomeTest # standalone DB console app
# welcome.examples.org / welcomeCLI.examples.org are @WebApp — need the XQIZ.IT platform
Expand Down Expand Up @@ -251,6 +251,10 @@ xtc build -o out -L out -r chess-game/app/webapp chess-game/app/src/main/x/chess
A "hello world" web application with a React frontend. Demonstrates `@WebApp`,
database integration (`oodb`), static content serving, and a CLI management tool.

The frontend in `welcome/webapp` is built with Vite (Node.js 20.19+ or 22.12+ when not using the
Gradle-downloaded Node). `npm start` (or `npm run dev`) serves it on http://localhost:3000 with hot
reload; the `/welcome/*` API calls need the backend hosted on the XQIZ.IT platform.

The `welcomeTest` module is a standalone console app that exercises the database
layer directly. It opens a `jsondb` connection to the `welcomeDB` schema, looks
up a guest entry in the `counters` map, increments it, and prints the visit count:
Expand Down
5 changes: 4 additions & 1 deletion welcome/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
"vite": "^8.3.1"
},
"scripts": {
"start": "vite",
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"preview": "vite preview",
"test": "echo \"No frontend tests: the Create React App boilerplate test was removed in the move to Vite.\" && exit 1",
"eject": "echo \"Nothing to eject: the Vite build configuration is already in vite.config.js.\""
}
}
5 changes: 5 additions & 0 deletions welcome/webapp/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ export default defineConfig({
build: {
outDir: 'build',
},
// Keep the Create React App dev-server defaults (port 3000, open a browser) for `npm start`.
server: {
port: 3000,
open: true,
},
});
Loading