Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 869803c

Browse files
committed
feat: Add tailscale-webfinger script endpoint that runs uvicorn
1 parent db8eb8f commit 869803c

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

Diff for: poetry.lock

+33-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ readme = "README.md"
88
[tool.poetry.dependencies]
99
python = "^3.11"
1010
fastapi = "^0.109.0"
11+
uvicorn = "^0.30.6"
1112

1213
[tool.poetry.group.dev.dependencies]
1314
ruff = "^0.1.13"
@@ -25,3 +26,6 @@ description = ""
2526
version = "0.1.0"
2627
readme = "README.md"
2728
authors = [{ name = "James Hodgkinson", email = "james@terminaloutcomes.com" }]
29+
30+
[tool.poetry.scripts]
31+
tailscale-webfinger = 'tailscale_webfinger:uvicorn_run'

Diff for: tailscale_webfinger/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@
77
import os
88
from typing import Any, Dict
99
from fastapi import FastAPI, HTTPException, Request
10+
import uvicorn
1011

1112

1213
app = FastAPI()
1314

1415

16+
def uvicorn_run():
17+
uvicorn.run("tailscale_webfinger:app")
18+
19+
1520
@lru_cache()
1621
def get_oidc_url() -> str:
1722
"""makes the OIDC URL"""

0 commit comments

Comments
 (0)