Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamsocket/python-fastapi-helloworld
https://github.com/jamsocket/python-fastapi-helloworld
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/jamsocket/python-fastapi-helloworld
- Owner: jamsocket
- Created: 2024-01-02T21:23:52.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-04-01T18:09:17.000Z (9 months ago)
- Last Synced: 2024-05-17T06:49:54.244Z (7 months ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prequisites
1. Have Docker running
2. Have NodeJS >18 installed.## Run Server
1. Clone project
2. `cd server`
3. Run `npx jamsocket dev` which builds a new docker image using `Dockerfile` and `jamsocket.config.js`## Spawn the backend & get a response
1. Run `curl -X POST http://localhost:8080/user/my-account/service/python-fastapi-helloworld/spawn`You should see a response like this:
```json
{
"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"
}
```2. Use the url in the backend response and run `curl {BACKEND URL}`
You should see a response like this:
```json
{ "res": "Hello World" }
```Or spawn and connect with Jamsocket's javascript client library, `@jamsocket/server`.