Trying logux
Copy the .env.example
file to src/server/.env
cp ./.env.example ./src/server/.env
Start the logux
server in one terminal:
npm run start:logux
In a different terminal, start the frontend server:
npm run start:vite
See this article for more details about application architecture.
We create application state and logic in the file ./src/state.ts.
This exports static functions, creates a state object, sets up URL routing, and
subscribes to logux
.
In the view code, you would call the functions exposed in state with a state instance in response to DOM events.