How to renew Localhost certificate to run localhost in MacOS? - reactjs

I'm using a React app with HTTPS=true npm start command and until today the App was perfectly running on the localhost. Today I received the following message from Chrome and have no idea how to run the App again. To use my backend APIs, I need to run the app with HTTPS. When I check my certificates, It says that the localhost certificate was expired yesterday.
I tried to Add the current certificate to the system Keychain, tried to generate a key.pem and re-run the localhost. None of those worked for me. How can I run my app again?

Related

close all network request in chrome devtool

I created a React and Spring boot project (not mvc). I build the React part by using "npm run build" and added the ssl certificate. This project is running inside windows server. But when I make request to backend I can see all the request in dev tools and it is big issue for safety. also when user make request to login it is appeared in chrome devtools username and password. How can I hide them.
Thanks

How to force HTTPS with create-react-app on heroku

I'm running a very basic react app on Heroku and would like to force https on the production server, while still running localhost on https. I cannot for the life of me figure out how to do this on Heroku.
SSL and domain has been setup and works fine when I manually enter https:// before the domain. But if I manually type http:// this also works.
How do I redirect all http traffic to https for my react app on Heroko. I would like this to happen:
localhost:3000 still works in development
https is forced on production domain
create-react-app still runs without being "ejected"
Typically I'd set this up on the DNS, but Heroku only allows for a CNAME setup, so I cannot do this on the DNS level. I assume a custom server is required like express, but I cannot find any documentation on how to do this for production while stille working normally in development/localhost.

Ngrok keeps reconnecting with Nextjs

I'm trying to run my Nextjs App running on localhost:3000 with ngrok. The ngrok tunnel doesn't redirect me nowhere. I only see a short message that ngrok is reconnecting. The app is running on localhost and all seems fine.
Does anybody know what could be the problem? I tried running ngrok with a liveserver on port 5500 and a nuxtjs app on port 3000 and both worked fine.

Start React app using domain instead of localhost

I start my React app using:
npm start
This starts the app on localhost:3000
I would like to have it start with a domain instead of localhost. When testing locally, I have a local domain (example mydomain.com) set to IP address 127.0.0.1. This allows me to use the actual domain in code when making requests to the backend. Without this, my code would need to support both localhost and my domain and swap them out in production.
npm start is only a command to run your react app in development mode.. for faster build and publish functionalities..
So for production, you will be using npm build to get a production build for the same. This won;t be automatically deplyed or hosted on your localhost:3000.
So production deployment you will have to host your compiled build files using IIS or some hosting application. There you can configure your preferred DNS, whcihever domain name you would want to use.
You can customise the url for deployment for development.
In your .env.development add this line
HOST='mydomain.com'
If you want to deploy at https, add this line also in same file
HTTPS=true

Google App Engine and PHPStorm running on localhost

i am trying to launch google App Engine on my localhost via phpstorm, and i followed:
http://www.youtube.com/watch?v=o_r_O-YjzKo#t=85
When i run it on port 8080, (Default), i get this:
C:\Python27\python.exe "C:/Program Files (x86)/Google/google_appengine/dev_appserver.py" --php_executable_path=C:\PHP\php-cgi.exe .
In the PHPStorm Terminal. When i visit localhost:8080, localhost, 127.0.0.1:8080 or 127.0.0.1 i get page not found.
But if i launch the app via Google App Engine Launcher, it works fine on port localhost:8080.
Cant figure out the issue here, its quite odd.
I had the same issue: I couldn't run App Engine from PHPStorm while it worked from the console. I guess the problem is that the server first asks if you want to check for updates and you can't answer it in PHPStorm.
Press Y or N in the console then if you try running App Engine again from PHPStorm, it should work! In order to launch App Engine from console, type: {google_appengine folder}/dev_appserver.py {project folder}

Resources