fixed entrypoint
This commit is contained in:
parent
4f121e4ed0
commit
770bb13add
|
@ -6,8 +6,8 @@ from app.database import Base
|
|||
class PassportData(Base):
|
||||
__tablename__ = 'passport_data'
|
||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
number = Column(String, unique=True, nullable=False)
|
||||
name = Column(String, nullable=False)
|
||||
surname = Column(String, nullable=False)
|
||||
gender = Column(String, nullable=False)
|
||||
number = Column(String(255), unique=True, nullable=False)
|
||||
name = Column(String(255), nullable=False)
|
||||
surname = Column(String(255), nullable=False)
|
||||
gender = Column(String(255), nullable=False)
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from app.database import engine
|
||||
from app.models import Base
|
||||
import argparse
|
||||
|
||||
import uvicorn
|
||||
|
||||
def main(port):
|
||||
|
@ -9,7 +11,7 @@ def main(port):
|
|||
print("Database tables created.")
|
||||
|
||||
# Run the FastAPI app using uvicorn
|
||||
uvicorn.run("app.main:app", host="0.0.0.0", port=port, reload=True)
|
||||
# uvicorn.run("app.main:app", host="0.0.0.0", port=port, reload=True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Create argument parser
|
||||
|
|
Loading…
Reference in New Issue