File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
docs/start/framework/react Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ When a TanStack Start application is being deployed, the `target` value in the T
3636- [ ` netlify ` ] ( #netlify ) : Deploy to Netlify
3737- [ ` vercel ` ] ( #vercel ) : Deploy to Vercel
3838- [ ` cloudflare-pages ` ] ( #cloudflare-pages ) : Deploy to Cloudflare Pages
39+ - [ ` railway ` ] ( #railway ) : Deploy to Railway
3940- [ ` node-server ` ] ( #nodejs ) : Deploy to a Node.js server
4041- [ ` bun ` ] ( #bun ) : Deploy to a Bun server
4142- ... and more to come!
@@ -108,6 +109,41 @@ directory = "./.output/public"
108109
109110Deploy your application to Cloudflare Workers using their one-click deployment process, and you're ready to go!
110111
112+ ### Railway
113+
114+ Railway automatically detects Build and Start commands when building and deploying to a service.
115+
116+ Set the ` target ` value to ` node-server ` in your ` vite.config.ts ` file.
117+
118+ ``` ts
119+ // vite.config.ts
120+ import { tanstackStart } from ' @tanstack/react-start/plugin/vite'
121+ import { defineConfig } from ' vite'
122+
123+ export default defineConfig ({
124+ plugins: [tanstackStart ({ target: ' node-server' })],
125+ })
126+ ```
127+
128+ Ensure ` build ` and ` start ` npm scripts are present in your ` package.json ` file:
129+
130+ ``` json
131+ "build" : " vite build" ,
132+ "start" : " node .output/server/index.mjs"
133+ ```
134+
135+ Then you can run the following command to build your application:
136+
137+ ``` sh
138+ npm run build
139+ ```
140+
141+ You can start your application by running:
142+
143+ ``` sh
144+ npm run start
145+ ```
146+
111147### Node.js
112148
113149Set the ` target ` value to ` node-server ` in your ` vite.config.ts ` file.
You can’t perform that action at this time.
0 commit comments