Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can i run my play project whith react js in port 9000 #15

Open
jaatafaa opened this issue Dec 4, 2020 · 4 comments
Open

can i run my play project whith react js in port 9000 #15

jaatafaa opened this issue Dec 4, 2020 · 4 comments

Comments

@jaatafaa
Copy link

jaatafaa commented Dec 4, 2020

i have version 1 for my application , who the front end files are .scala.html in directory /app/views.
and now i want to use react js for another front end files for my project.
It s is possible?
can i integrate front end file with react (/ui/src/*)
and all run in port 9000 ?

Thanks in advance

@Kaybarax
Copy link

Kaybarax commented Dec 4, 2020

Yes you can do that if you would like to.

@jaatafaa
Copy link
Author

jaatafaa commented Dec 4, 2020

how ? my project run in port 3000 and load data from back end play java , but i can t see my front end who was is /app/views/
i just want see my front end in java play and the new front in /ui/src

@Kaybarax
Copy link

Kaybarax commented Dec 4, 2020

Your original frontend of /app/views/ should be running from your default port e.g. 8080.
So if you have an index.scala.html view, it should be rendering on that port. And your integrated react application can and will run alongside on port 3000

@jaatafaa
Copy link
Author

jaatafaa commented Dec 4, 2020

according to your explanation I must have two ports for my application and this is what I do not want, because it requires two servers (java and node).
now when i run my application, it turn on port 3000 , it s now the default port , and i cant render all front who is in /app/views/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants