- Have Docker running
- Have NodeJS >18 installed.
- Clone project
cd server
- Run
npx jamsocket dev
which builds a new docker image usingDockerfile
andjamsocket.config.js
- Run
curl -X POST http://localhost:8080/user/my-account/service/python-fastapi-helloworld/spawn
You should see a response like this:
{
"url": "http://localhost:9090/tYVHfS4PKgufdhwGCnn6LLfAaCo_iAHitbw4Bg8ETjA/",
"name": "ba-xt8nmtlgti18qx",
"status_url": "http://0.0.0.0:8080/pub/b/ba-xt8nmtlgti18qx/status",
"spawned": true,
"status": "Loading"
}
- Use the url in the backend response and run
curl {BACKEND URL}
You should see a response like this:
{ "res": "Hello World" }
Or spawn and connect with Jamsocket's javascript client library, @jamsocket/server
.