Skip to content

how to use ssl certificate #387

Closed Answered by falkoschindler
morningstarsabrina asked this question in Q&A
Discussion options

You must be logged in to vote

You can adapt the FastAPI example to start the server yourself:

import uvicorn
from fastapi import FastAPI
from nicegui import ui

# you need to create the FastAPI app yourself
app = FastAPI()

# normal NiceGUI code
ui.label('Hello!')

# replace ui.run with ui.run_with to connect NiceGUI with the app
ui.run_with(app)

# start uvicorn with the app
uvicorn.run(app, host='0.0.0.0', port=8000)

Nevertheless, we should think about adding SSL parameters (or **kwargs) to ui.run.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@morningstarsabrina
Comment options

@morningstarsabrina
Comment options

@falkoschindler
Comment options

@morningstarsabrina
Comment options

Answer selected by morningstarsabrina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants