Skip navigation
Codex tip: Build and deploy APIs with Sites
0:00 / 0:34

Codex tip: Build and deploy APIs with Sites

Stephen

@siegerts3.8K followers

Visit on X
68 likesDownloadOriginal post

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)

  • Stephen's profile picture

    @siegerts

    Plus, Custom Domain config is available.

    4 likes

  • Mahmoud's profile picture

    @thisismahmoud

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

    2 likes

  • Stephen's profile picture

    @siegerts

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

    1 like

  • Neuromancer's profile picture

    @Neuromancer_2k

    How do you add secrets /api token to the sites ?

    1 like

  • Stephen's profile picture

    @siegerts

    Environment vars and secrets - more docs here -

    2 likes

  • aaoo's profile picture

    @xiguabobo666

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

  • Stephen's profile picture

    @siegerts

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