Let’s say I have this simple @TrameApp:
@TrameApp()
class MyTrameApp:
def __init__(self, server: Server = None):
self.server = get_server(server)
def main():
app = MyTrameApp()
app.server.start()
if __name__ == "__main__":
main()
How would I add an endpoint that returns the string Hello World as type text/plain?
How would I add an endpoint that returns the string console.log('Hello World'); as type application/javascript?