Can we have Springboot jar + NextJs running on same port as a packaged Jar

0

Ideally NextJs code runs on a different port 3000. Can we have NextJS code clubbed in Springboot executable Jar /WAR (embedded Tomcat) which runs on default port 8080, and make the clubbed application jar/war run on single port?

Just want to highlight, React JS can be clubbed with Springboot , whereas NextJS I am no sure.

java next.js spring-boot
2021-11-24 06:13:22
1

0

Next.js is written in Javascript, Spring Boot is written in Java, they cannot be run together. However, after you run them in different ports, you can use a reverse proxy (e.g. Nginx) to stick them together under the same port but different endpoints (for example map Next.js to / and Spring Boot to /api)

2021-12-23 04:15:28

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................