Spawn Actor Mesh Runtime for Node/Bun
curl -sSL https://github.com/eigr/spawn/releases/download/v1.4.3/install.sh | sh
We recommend you to use Typescript for better usage overall.
This lib supports both Bun and NodeJS runtimes, Bun performs invocations ~2x faster, we recommend using Bun.
spawn new node hello_world
# with yarn
yarn start
# or with pnpm
pnpm start
# or if you want to use bun instead of NodeJS use:
yarn start-bun
spawn dev run -p ./protos -s spawn-system -W
Thats it! You can test invoking the hello world actor with our pre configured HTTP activator.
curl -vvv -H 'Accept: application/json' http://localhost:9980/v1/hello_world?message=World
You can check test folder to see some examples
PROXY_HTTP_PORT
This is the port of spawn proxy servicePROXY_HTTP_HOST
This is the host of spawn proxy serviceUSER_FUNCTION_PORT
This is the port that your service will expose to communicate with Spawn