In the frontend/ directory:
- install the dependencies with
npm install(orpnpm installoryarn) - generate the windmill client:
npm run generate-backend-client
## on mac use
npm run generate-backend-client-macOnce the dependencies are installed, just start the dev server:
npm run devThe default proxy is setup to use the remote backend: https://app.windmill.dev.
You can configure another proxy to use like so:
REMOTE=http://127.0.0.1:8000 REMOTE_LSP=http://127.0.0.1:3001 npm run devdocker build . -t windmill
docker compose up db windmill_server windmill_workerREMOTE=http://localhost REMOTE_LSP=http://localhost npm run devPrerequisites
-
Install Rust as explained on the website.
-
Install llvm
On OSX:
brew install llvm gsed # make LLVM tools available on PATH echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc # now, restart your shell. You should now have the `lld` binary on your PATH.
-
To test that you have Rust and Cargo installed run
cargo --version
Known issue on M1 Mac while running cargorun
- You may encounter
linking with cc failedbuild time error. - To solve this run:
echo 'export RUSTFLAGS="-L/opt/homebrew/opt/libomp/lib"' >> ~/.zshrc source ~/.zshrc
In the root folder:
docker-compose up dbIn the backend folder:
DATABASE_URL=postgres://postgres:changeme@127.0.0.1:5433/windmill?sslmode=disable cargo runIn the frontend folder:
REMOTE=http://127.0.0.1:8000 REMOTE_LSP=http://127.0.0.1:3001 npm run devNODE_OPTIONS=--max_old_space_size=8096 npm run buildThis project uses prettier and prettier-plugin-svelte, be sure to install them and set up your editor to run prettier automatically before you commit.
Recommended config for VS Code:
- Prettier for formatting
- Svelte for VS Code for highlighting and Intellisense
- make sure that your VS Code
settings.jsonhas the following lines:
"[svelte]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}- turn format on save on
The project is built with SvelteKit and uses as output static files. There are others adapters for sveltekit, but we use the static adapter.
To build the frontend as static assets, use:
npm run build
The output is in the build folder.
The default build assume you serve every non static files as the 200.html file which is catchall. If you prefer a normal layout, you can use:
NOTCATCHALL=true npm run build
which will generate an index.html and allow you to serve the frontend with any static server.
Env variables used for build are set in .env file. See https://vitejs.dev/guide/env-and-mode.html#env-files for more details.