habulaj commited on
Commit
4a8147e
·
verified ·
1 Parent(s): f4381e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,7 +1,11 @@
1
  from fastapi import FastAPI
 
2
 
3
  app = FastAPI()
4
 
 
 
 
5
  @app.get("/")
6
- def greet_json():
7
- return {"Hello": "World!"}
 
1
  from fastapi import FastAPI
2
+ from routes.hello import router as hello_router
3
 
4
  app = FastAPI()
5
 
6
+ # Incluindo a rota separada
7
+ app.include_router(hello_router)
8
+
9
  @app.get("/")
10
+ def root():
11
+ return {"message": "Welcome to the API!"}