How to Host / Deploy React application to Tomcat Server | React | A little coding

preview_player
Показать описание
Here is a small video about deploying the react app on tomcat.
some useful commands:
$npm start
$npm run build
============ bash =================
cd /path/to/react-app
npm run build
rm -rf /path/to/tomcat/webapps/boardGame/*
cd /path/to/tomcat/webapps/
cp -r /path/to/react-app/build/ boardGame/
echo "Done bro, check on chrome"
==================================
Thanks
Рекомендации по теме
Комментарии
Автор

01:25= build folder, 02:38= Tomcat webapp folder,

aritrakhatua
Автор

inner route are not working can you please help me fix it ?

FullStackDevGreg
Автор

Getting 404 error inside tomcat after refreshing page or invalid page, how to solve this issue?

kishanacharya
Автор

For BrowserRouter, Switch & Route in app.js for multiple routes it shows blank page
Can u guide me how to fix this

prateekmeher
Автор

Can I do this using spring boot an the Tomcat embebed container?

dave
Автор

My local server (npm run start) is not working after adding homepage in package.json.
Any solution for this ?

nikhilguptaiic