This repo contains a script which will deploy any runnable .wasm as a hosted application on Railway. The .wasm runnable will be deployed to Railway as a service.
- Node.js installed locally.
- Docker installed locally.
- A user-provided API key for the Railway API.
- A user-provided id for Docker hub.
- An existing project id on Railway.
npm install
- Build your .wasm application using tools of choice.
- Deploy the wasm from the command line.
RAILWAY_API_KEY
RAILWAY_PROJECT_ID
DOCKER_ID
The following example shows how to deploy from a git repo that builds an http server in wasm.
cd ..
git clone [email protected]:phil-kahrl/wasm-server.git
cd wasm-server
cargo build --target wasm32-wasi --release
cd ..
./run.sh ../wasm-server/target/wasm32-wasi/release/server.wasm