I have a Next Js app. deployed in azure VM. Running successfully when running it using putty(with the command "npm start"). However, the URL comes down frequently(server stops). Is there a way/script to keep it up and running once started from my putty until when I stop it manually?
Related
running "npm start" command shows a 'nginx' welcome page on browser instead of the default 'react app' starter page. I recently started practicing using docker, where i had to run "docker pull nginx", i think this is what started the problem as far as running 'npm start' in my react app folder. I did not have this problem prior to working with docker. I want to be able to run 'npm start' inside my react app folder and have it show my react app page in the browser and not the nginx server welcome page.
I'll hazard a guess that you have a docker container running and you've configured it to map ports on your machine to port in the container. If that's the case, you should just terminate the container. Here's an example of doing this on Windows via cmd.exe:
C:\Users\HPierce>docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
14a8bc9fc077 transcripts_web "tail -f /dev/null" 11 days ago Up 4 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp transcripts_web_1
C:\Users\HPierce>docker container kill 14a8bc9fc077
14a8bc9fc077
C:\Users\HPierce>docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
You can see that the container was mapping my host's port 80 to the container's port 80.
If you have no containers running, here's a few other things you could try:
Change the port that create-react-app listens on
Check if Nginx is installed on your host machine and remove it or stop the server from running.
I made a portfolio website with create react app and I opened an ec2 instance to run my website, when I'm using the ssh command "sudo npm start" afterward the site is running, but when I close down the ssh my website is not online anymore, How can I make my site run indefinitely?
You want to run this as a background service using systemd.
Try taking a look at: https://medium.com/#benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6.
I am receiving an error on Azure while getting it to build.
I have a react app and my azure is connected with bitbucket. So when I upload the changes to my bitbucket the Azure starts building and deploying the changes and fail with the errors in the following screenshot. I am not sure what is happening to it because I am new to Azure. Please guide me, guys! Thank you.
Note: I have received the same kind of error on my windows env laptop when I build my react app locally, But I haven't received it on my Linux environment pc. Could it be possible that the files didn't copy properly when I tried to move the project through pen drive?. On my windows laptop, I receive this kind of error on npm run build but when I run the npm command three times it satrts building properly on the third time without any error.
I tried to run my ionic app to my itouch device. When I first run, the app launch smoothly with no problem but when I try to re run again the same app. the terminal display this message "error: process launch failed: timed out trying to launch app"
I am using ionic run ios --device on the terminal.
run ios --device starts debugging the App on the device. If you restart you App, do you need Debugging? If not, try to exit the debugging mode in terminal and restart your app on your device. Does this work?
Open the project by opening [yourAppFolder]/platforms/ios/[yourAppName].xcodeproj file in Xcode. And run the code in your phone just like running a Xcode project in the phone.
Purely for fun I've written a tiny http server in C and using the c buildpack listed on the heroku docs, I've got it building a binary in heroku, and I can run it fine via "heroku run ./httpd 52132" It logs to the console "Starting httpd.." etc as expected but I obviously can't access it because thats a worker dyno, not a web dyno so isn't routed to.
My problem comes with I add a Procfile containing "web: ./httpd $PORT" - Heroku says its launched it, heroku ps shows its running but the requests timeout, and the application log never logs any messages from the app (I don't see Starting httpd...)
So in theory its running, but not running.... I'm confused.
As I said, it works when I don't run it via the procfile for web :(!!
Any ideas? (I know this is kind of niche!)
Thanks