Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
samplemicroservices
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
madhuri.penikalapati
samplemicroservices
Commits
ed40d1a0
Commit
ed40d1a0
authored
Aug 05, 2023
by
madhuri.penikalapati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update main.py
parent
76979cfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
main.py
main.py
+9
-1
No files found.
main.py
View file @
ed40d1a0
import
logging
import
uvicorn
from
fastapi
import
FastAPI
from
fastapi
import
FastAPI
app
=
FastAPI
()
app
=
FastAPI
()
@
app
.
get
(
"/"
)
@
app
.
get
(
"/"
)
def
read_root
():
def
read_root
():
return
{
"message"
:
"Hello, FastAPI!"
}
return
{
"message"
:
"Hello, World!"
}
if
__name__
==
"__main__"
:
bind
=
"0.0.0.0"
# Change this to your desired bind address (e.g., "127.0.0.1")
port
=
8000
# Change this to your desired port number
logging
.
info
(
f
"App Starting at {bind}:{port}"
)
uvicorn
.
run
(
"main:app"
,
host
=
bind
,
port
=
port
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment