Codex tip: Build and deploy APIs with Sites
Stephen
Visit on X@siegerts3.8K followers
11,778 views
Codex tip: Build and deploy APIs with Sites
Not just web apps.
Below is a JSON API using Hono, database storage, typed Drizzle queries, and a live database viewer. It was all built, deployed, and managed from Codex - with the web frontend.
Bonus: Had Codex generate and run database migrations.
7 Comments
Comments from the original post on X (Twitter)

@siegerts
Plus, Custom Domain config is available.
4 likes

@thisismahmoud
I missed seeing you on my time line. Congrats on joining the Codex team!! 😄 Codex is my daily driver
2 likes

@siegerts
You're showing up on mine too - The world is definitely healing 🤣 Codexing all the things!
1 like

@Neuromancer_2k
How do you add secrets /api token to the sites ?
1 like

@siegerts
Environment vars and secrets - more docs here -
2 likes

@xiguabobo666
How did it handle migrations and access control for the live DB viewer after deploy?

@siegerts
Behind the scenes, the DB is a D1 binding (@CloudflareDev) that is available to the server side compute env.