How to deploy FastAPI project (python) without Public Directory?

I want to deploy a FastAPI project, but to deploy (static) I need a “Public directory”. My project does not have an index.html file, so what do I do?

https://replit.com/@hokuspookus/MatsedelAPI

:wave: Welcome @hokuspookus!

You can’t deploy a Python Repl as static.

1 Like

:broken_heart: Would I have to pay for autoscale?

Yes, you would need to deploy as Autoscale or Reserved VM (Autoscale would be significantly cheaper if your site isn’t used too often)

2 Likes

And what could that cost? The price estimation tool just says “No cost with Replit Core”. $2? Does that sounds about right?

1 Like

Well, it depends how often your site is used.

1 Like

Do you ONLY pay for when the website is active? So it automatically shuts down after a bit?

1 Like

Yes. It then turns back on after a request is made.

1 Like

Do you know how long before it tuns off?

1 Like

Nope. Probably after the user closes out of the webpage?

But no worries, I can assure you it turns back on very fast (speaking from personal experience with deploying).

1 Like

Thank you for the quick and helpful responses :+1:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.