As i understood, you want to deploy it on a local server, not locally on your developing device.
I thought about doing that...but I'm not so sure IT will be okay with it always running... :(
How can you use a server if its not running? Just like WAMP (which runs apache), or whatever you got rolling there, it must be running. So, just make it a background process like slawomir suggested.
PS I dont think you understand node server properly though. Read this to understand why node server needs reloading. After that you need to understand that no hot reload tool is perfect, and you gonna need to restart your server from time to time.
PPS I dont know what this means
[...] plain, regular old server. The address is localhost running on port 3000.
if there is a server running on 3000, youll need to change port for your server to smth else (most common is 9000)
Answer from CT. on Stack OverflowAs i understood, you want to deploy it on a local server, not locally on your developing device.
I thought about doing that...but I'm not so sure IT will be okay with it always running... :(
How can you use a server if its not running? Just like WAMP (which runs apache), or whatever you got rolling there, it must be running. So, just make it a background process like slawomir suggested.
PS I dont think you understand node server properly though. Read this to understand why node server needs reloading. After that you need to understand that no hot reload tool is perfect, and you gonna need to restart your server from time to time.
PPS I dont know what this means
[...] plain, regular old server. The address is localhost running on port 3000.
if there is a server running on 3000, youll need to change port for your server to smth else (most common is 9000)
To solve the problem you can create a startup script, which executes npm start and nodemon server. Then make sure to keep it hidden, so that your server will be always running. Keep in mind though, that any errors thrown will stop your server and unless you configure it, the server won't reload by itself.
Can a React App run locally like an HTML page, without node, http server or express?
How do I run a React App locally?
Where To Deploy a React App?
As someone mentioned, you can use Netlify, it's a simple tool to quickly deploy static websites. Your react app can still talk to your backend somewhere else. Netlify also offers a lot of extra good stuff, like HTTPS, CD, DNS, ...
Otherwise, you can go for a more standard AWS S3 or Google Cloud Storage set up, both are heavily used by people for static sites. If you're already using AWS, S3 might be a good option to stay within the ecosystem.
More on reddit.comEasiest way to deploy a React App? Captainduckduck
Why not just use github pages?
yarn add gh-pages & & yarn run build & & yarn run gh-pages deploy
More on reddit.comVideos
I am totally new to React, just figured out I should learn React since i completed my JS course. Now since im just starting out, the documentation around React production deployment isnt making complete sense to me, maybe you could help me.
There is a tool I built in JS as part of final project. Its a single html file, single css file, single Js file bundle. It has lots of user interaction, elements, events happening locally, and all storage is in browser localStorage.
As I learn React, I want to replicate this tool using React and React Router. Laymen reading up, a lot of articles say that the final build is really just html and JS files. However i also see that you need to run an http server? or npm install -g serve and serve -s build ? or run it via express?
https://create-react-app.dev/docs/deployment/
TLDR: If react product build via npm run build essentially creates a "build directory with a production build of your app. Set up your favorite HTTP server so that a visitor to your site is served index.html" , can i just directly open this index.html file in a browser and run the entire react app locally?
I've never worked with React before, but I've been tasked with updating/fixing a website built with React. Specifically, the ReadMe says "This project was bootstrapped with Create React App.". So after I clone the app from github, how do I run it locally so I can quickly view edits to the website and test it on my machine? The ReadMe talks about using yarn start to run the app in development mode so you can view the website on localhost but nothing I've tried so far seems to work.