R
Railway13mo ago
Devmoha

Next js + Django restframework

i have next js app consuming api from django restframework can i both deploy on railway as front end and backend please answer
Solution:
i have next js app consuming api from django restframework can i both deploy on railway as front end and backend please answer
Jump to solution
20 Replies
Percy
Percy13mo ago
Project ID: N/A
Brody
Brody13mo ago
yes you can
Devmoha
Devmoha13mo ago
man i dont have not deployed the project now but i need guidance drf + next on railway using 5$ plan is the server being able to handle 1,000 request/second atleast please answer
Brody
Brody13mo ago
probably can
Devmoha
Devmoha13mo ago
yes ok any tutorials or blog on my stack and tell me if its common way to do this
Brody
Brody13mo ago
deploy next? just make a new service and connect your next repo and see what happens
Devmoha
Devmoha13mo ago
no need for environment variables
Brody
Brody13mo ago
that's up to you
Devmoha
Devmoha13mo ago
how is that i mean is it required
Brody
Brody13mo ago
but you'll likely need to change the start command, you can reference this next template for the proper start command https://github.com/railwayapp-templates/nextjs-prisma
Devmoha
Devmoha13mo ago
what if im using vite for react
Brody
Brody13mo ago
I do not know what your app requirements are, you tell me if you need to use any environment variables, it's your app after all then that's not next, this question is about next
Devmoha
Devmoha13mo ago
create your next project -> push to github -> in railway choose your repo -> deploy ... DONE ! note that my next app is consuming an api from my django restapi project in railway
Brody
Brody13mo ago
if you are instead using vite + react, please reference this template https://github.com/brody192/vite-react-template
Devmoha
Devmoha13mo ago
and becouse its consuming api do you think any extra deployment setting needed or its same
Brody
Brody13mo ago
you have a backend and a frontend, that means you need two services
Devmoha
Devmoha13mo ago
two project right
Brody
Brody13mo ago
no one project two services possibly a database if your app needs it
Devmoha
Devmoha13mo ago
for django :database project , app project , for next js : ?
Brody
Brody13mo ago
no django backend, nextJs frontend, database all in the same project