Appearance
Configuration
You can configure the port that the Tanstack Start dev server runs on, and more options in your config file.
/**
* The client is the main app for the client.
*
* It is a react application that is built with vite.
*
* @link https://tanstack.com/start/latest
*
* @default {object} = { autostart: false, proxy: { autostart: true } }
*/
client: z
.object({
/**
* Whether to automatically start the client server
* in dev mode.
*
* @default true
*/
autostart: z.boolean().default(true),
/**
* The port to run the client dev server on.
*
* @default 3000
*/
port: z.number().default(3000),
/**
* Whether to automatically start the client proxy
* in dev mode. This uses the cloudflare tunnel that
* is created for your dev stage.
*
* For example, https://nickgraffis.modelmatch.dev will be proxied
* to http://localhost:3000 (or whatever port you have set).
*
* @default true
*/
proxy: z
.object({
autostart: z.boolean().default(true),
})
.default({ autostart: true }),
})
.default({ autostart: true, proxy: { autostart: true } }),🪄 Development Proxy (aka Tunnel)
The developer proxy is an https proxy to your localhost server running the Tanstack Start & Vite application.
You can access it at https://<stage>.modelmatch.dev.
It can be extremely useful for multiple device testing, sync integration, stripe and payments that may require https. It provides all the same developer tools you get with your Tanstack Start & Vite server.
📙 Configuration
You can configure weather or not to autostart the tunnel via your config file. It will open logs in the multiplexer.
/**
* Whether to automatically start the client proxy
* in dev mode. This uses the cloudflare tunnel that
* is created for your dev stage.
*
* For example, https://nickgraffis.modelmatch.dev will be proxied
* to http://localhost:3000 (or whatever port you have set).
*
* @default true
*/
proxy: z.object({
autostart: z.boolean().default(true),
}).default({ autostart: true }),🦾 Requirements
You need to have the cloudflared CLI installed on your machine. This is a step in the intro script, but you can also do so manually.