close to final version added the subtaskand comment working section
This commit is contained in:
44
README_WASM.md
Normal file
44
README_WASM.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Running Scrum Manager with Fermyon Spin
|
||||
|
||||
This project has been configured to run on [Fermyon Spin](https://developer.fermyon.com/spin/index), allowing for quick deployment as WebAssembly components.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Install Spin](https://developer.fermyon.com/spin/install) (v2.0 or later)
|
||||
- Node.js and npm
|
||||
|
||||
## Build
|
||||
|
||||
To build both the frontend and the Wasm-compatible backend:
|
||||
|
||||
```bash
|
||||
# Build Frontend (outputs to dist/)
|
||||
npm run build
|
||||
|
||||
# Build Backend (outputs to server/dist/spin.js)
|
||||
cd server
|
||||
npm install
|
||||
npm run build:spin
|
||||
cd ..
|
||||
```
|
||||
|
||||
## Running Locally
|
||||
|
||||
You can run the application locally using `spin up`.
|
||||
Note: The application requires a MySQL database. Spin connects to it via the address specified in `spin.toml`.
|
||||
|
||||
1. Ensure your MySQL database is running (e.g., via Docker).
|
||||
2. Run Spin:
|
||||
|
||||
```bash
|
||||
spin up --sqlite # If using SQLite support (not fully implemented yet, defaults to MySQL config in spin.toml)
|
||||
# OR for MySQL:
|
||||
spin up
|
||||
```
|
||||
*Note: You may need to adjust the `db_host` and credentials in `spin.toml` or via environment variables if your DB is not at localhost:3306.*
|
||||
|
||||
## Structure
|
||||
|
||||
- **`spin.toml`**: The Spin manifest file defining the application components.
|
||||
- **`server/app_spin.js`**: The Wasm entry point for the backend, using Hono.
|
||||
- **`server/db_spin.js`**: A database adapter adapting MySQL calls for the Spin environment.
|
||||
Reference in New Issue
Block a user