One provides a simple CLI for development, building, and serving your apps.
Developing an app with One is as simple as one dev.
Terminal
The One development server serves both web and native apps on the same port at the same time, and should hot reload both at once. When you see the Server running on message with a host and port, that is the same for both native and web.
The one dev command only starts the development server — it does not build or run the native iOS/Android shell. For native development you have two options:
Using Expo Go - For quick development without custom native dependencies, install Expo Go on your device. It will auto-detect from your simulator, or press q, r in the terminal to open the app.
Building the Native Shell - If you need custom native dependencies, you’ll need to build the native shell first:
one prebuild to generate the native Xcode/Android projectone run:ios or one run:android to build and launch the appSee the Build or Run the Native iOS App guide for detailed instructions.
Building your app for production happens through one build.
Terminal
The first argument is the platform, which defaults to web. To build for iOS:
yarn
npm
bun
pnpm
When building One for web, the output will be a mostly static directory of HTML, CSS, and JavaScript. Internally, One runs a few different Vite production builds to output client, server, and API folders. This output is always in the dist directory.
Ensure your .env file has a ONE_SERVER_URL set to your production URL:
Terminal
We provide a production server based on Hono with one serve that handles loaders, SSR, and API routes for you. You can choose a deploy target for that server via your Vite configuration:
vite.config.ts
For detailed deployment instructions, see the Deployment Guide.
If you are only using SPA and SSG routes and aren’t using loaders, you can statically serve the results of dist/client using any server you’d like.
We don’t have an end-to-end build command yet, but One is designed to be easy to integrate into existing Expo or React Native build processes.
If you’re familiar with EAS, see how to Build and Deliver Native Apps with EAS.
Or check out the iOS Native Guide for instructions on building your iOS app with Xcode.
Serve your web apps for production with one serve, after you’ve successfully run one build.
Terminal
One comes with a serve command that is powered by Hono. For high-traffic production deployments, use --cluster to fork multiple worker processes that share the same port. See one serve for details.
If you are only using SPA and SSG routes and aren’t using loaders, you don’t need to use one serve - you can statically serve the results of dist/client using any server you’d like.
You must run a one build before serve.
You can also run your production server programmatically:
Which takes options:
Manually apply package patches configured via the patches option in your Vite config. Patches are automatically applied during one dev and one build, but you can run this command to apply them manually.
Terminal
See patches configuration for how to configure patches.
Edit this page on GitHub.