I am trying to setup SSL Pinning for React app - javascript

I am creating a react app that will be bundled as packages for WebOS and Tizen OS.
Axios is used for network requests.
So is it possible to set up SSL Pinning for webapps?

Related

Communication between electron desktop app and react native app (client) using the same WiFi network

My react native app is responsible for sending information to my electron app, Is it possible to communicate an electron app with react native that is connected on the same WiFi network? If yes, how?
Im trying to find some articles, but I don't find anything helpful as of now.

Network connection problem in react native

I am trying to run react native app on android using expo cli. But getting this network connection error.network connection problem
Image is available on the above link.
in expo, if you are in development mode, both mobile and computer should be connected to the same wifi. so it can connect to your localhost.

How to handle backend API request for create-react-app bootstrapped app which is build and ran using "serve-s build" on AWS ec2?

I have create-react-app bootstrapped application which I build and then serve it to the static server using serve-s build. The React app is running on http://locahost:3000.
This app talks to my backend REST API(using java) which is running on http://locahost:8080.
Inside my React application, I have set axios.default.baseURL=http://localhost:8085/api.
Everything is fine on the localhost on my system. The React app talks to http://localhost:8085/api/xyz for CRUD operations and everything works great.
Now I have to deploy the project on AWS EC2 instance. The MySQL and REST API got deployed and rest API there is running on same instance on the port 8085 as http://locahost:8085. I have Apache server configured which sends the hostname(www.myxyzwebsite.com) to the http://locahost:3000 on the server. Everything is fine till now. The home page is visible on the browser.
Now, when the React app tries to communicate to the REST API from the browser, it is sending the request to the http://locahost:8085. Obviously, now the browser looks for some service running on port 8085 on my system and it couldn't find. Ideally, the request should go to the server with my hostname(www.myxyzwebsite.com/api/users/puspen). How to make this REST API call looks like an actual call like www.myxyzwebsite.com/users/pusp?
NOTE: Please note that this is not a server-side-rendered application.

PWA. Local development with webpack

I'm working with the React Create App and implementing PWA features. I configured PWA manifest successfully, the app can be installed. Now I'm working on Offline mode and here is a problem.
For local development, CRA uses webpack dev server. The app runs on http://localhost:3000
When I add the app to my Desktop and turn off the internet and the webpack dev server I'm facing the error: The webpage at http://localhost:3000/index.html might be temporarily down or it may have moved permanently to a new web address.
It looks like it doesn't work without the working server, eg. a connection.
So I can't test the PWA features because it just doesn't work in a Standalone Mode without any connection (internet & webpack dev server) but I have to.
Is it possible to handle it somehow? Or I'm doing something wrong?
Basically my question is: How to the PWA Offline mode locally in a Standalone mode when PWA installed on Homescreen and the Internet and Dev server are turned off.
Thanks for any help!
Kind Regards.

Creating a react-native app for IOS and I have created a Microsoft SQL server, how to connect these two?

I have an app built on react native and I want to connect to a database that i have made on the Microsoft SQL server. I have searched online and there are things like myssql but I still get errors with that. I followed this tutorial nodejs from the official Microsoft website, and it works with the nodejs and I use node to run it, but how can i use this in my react native project?
You can use AXIOS to make requests to your NodeJS Server
In Android you can access your localhost by the IP 10.0.2.2 (default proxy configured in your Android Virtual Device).
In iOS you can just use localhost
Remember to add the port assigned your NodeJS Server and the
protocol http
Example URL for Android: http://10.0.2.2:3000
You need to write back-end service code.I suggest you to use Asp.Net Web API .You can use Entity Framework.
Also you can use PHP,Java or Python...

Categories