Skip to content

Commit

Permalink
adds legacy Route for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Sep 14, 2022
1 parent c5689a3 commit 2f3c26c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion justpy/justpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from .routing import SetRoute
from .utilities import run_task, create_delayed_task
import uvicorn, logging, sys, os, traceback

import typing
#
# globals
#
Expand Down Expand Up @@ -190,6 +190,15 @@ def get_server():
"""
return jp_server

def Route(path:str,wpfunc:typing.Callable):
"""
legacy Route handling
Args:
path:str
"""
app.add_jproute(path,wpfunc)


def justpy(
func=None,
Expand Down

0 comments on commit 2f3c26c

Please sign in to comment.