This is a Kotlin Multiplatform project targeting Web and uses Room 3.0. Refer Figma : https://www.figma.com/design/4ncw03sYtNwO95HWyylb2a/To-do-List-Web-App-Design--Community-?node-id=26-119&t=oipiHvJN3f7FxXbY-0 *
- /composeApp is the code that will be shared across your Compose Multiplatform app in Js and WasmJs.
- /sqliteWasmWorker contains a web worker that implements the
WebWorkerSQLiteDriverprotocol using the SQLite WASM library. - /sqlJsmWorker contains a web worker that implements the
WebWorkerSQLiteDriverprotocol using the sql.js library. This worker, as implemented only support in-memory databases.
This small project demonstrates setting up Room 3.0 targeting the Web and configuring it with a WebWorkerSQLiteDriver
whose Web Worker are local NPM modules. Even though this project demonstrates two web worker implementations, only one
is needed for your project.
To build and run the development version of the web app, use the run configuration from the run widget in your IDE's toolbar or run it directly from the terminal:
- for the Wasm target (faster, modern browsers):
- on macOS/Linux
./gradlew :composeApp:wasmJsBrowserDevelopmentRun
- on Windows
.\gradlew.bat :composeApp:wasmJsBrowserDevelopmentRun
- on macOS/Linux
- for the JS target (slower, supports older browsers):
- on macOS/Linux
./gradlew :composeApp:jsBrowserDevelopmentRun
- on Windows
.\gradlew.bat :composeApp:jsBrowserDevelopmentRun
- on macOS/Linux