how to connect and deploy a flutter app to "real server" base on .netcore+iis+sqlserver - flutter

I have a project to make a website and application, and i did it by .net core and sql server and deploy it on iis and finally real server and special domain. Also i did my flutter app and tested it by url on local host ('http://192.168.1.110/project_Name/Controller/method_Name') to get connect with my database and it answered currectly,
But now i have a problem with my url to connect real server and create data on sql on server side(i can not find any special pattern to write url with domain-server-port and ...).
i dont know how to do it ,for example Should i add my fluttr app by iis or just change (new type of)url to get connection with my website backend ??
all of the sources learn about localhost.
could some one answer me about it or introduce appropriate source to guide??

One way to do that is to serve the flutter app as static files, you can achieve that by copying the output of flutter build web to the wwwroot folder of the ASP.Net core project should look something like this :
And then you need to serve it by adding the static files middleware in your request pipeline in your Startup.cs Configure method using the app.UseStaticFiles();
You should then access your flutter web application following the URL :
https://yourdomainname/index.html

Related

How to save Flutter web file_picker selections to host directory

There are numerous examples online for using file_picker and uploading to Firestore, SQL etc; but it appears there are none for uploading right to the webhost directory where index.html is being served (i.e ./uploads).
As I am using flutter web in a corporate environment my options for spinning up remote storage options are nearly nil. I merely want my flutter web app to allow users to upload to our own environment (I host my web build off Sharepoint and it works perfect).
The solution for posting to web found here (https://stackoverflow.com/a/65759028/82856) is very close to what I need except for the http.MultipartRequest part as I don't have a server API listening for POST requests. What other options do I have for merely writing uploads to a directory like ./upload? Thanks in advance.

Mobile DApp connecting to Wallet

I've been trying to create simple mobile app prototype (in Flutter) which would allow you to connect to a Wallet and obtains your address(es). I cannot get the connection working, all the clients I could find are written in JS so my initial approach was to get it working using webview. However none of the libraries worked for me:
WalletConnect - the generated wc: link is not recognized (universal links don't seem to work)
Metamask - doesn't inject the provider into the webview browser (I'm serving the scripts locally)
Web3Modal - requires secure server to run
I'm about to try to get local HTTPS server working in the app just to try the Web3Modal but I kind of have a feeling that I'm approaching this wrong.
Any suggestions appreciated.
There is now walletconnect_dart package which supports WC protocol for Flutter. I have created walletconnect_qrcode_modal_dart package which uses walletconnect_dart to emulate functionality of #walletconnect/qrcode-modal npm package.

Migrate ionic app in a server as a website

I have an ionic app that is connected to the mySQL database from a server and I want to migrate this app to the same server. I want to use this application as a website, which will continue to extract data from the mySQL database. How can I do that?
Thank you.
First I think you should probably split this into two projects:
the Ionic app, which communicates with the server via the API
the server side API (PHP file) with connection to the database
Usually these two would be in separate (Git) repositories.
You can then execute ionic build --prod to build the Ionic app for the web. The deployable files will be in the www directory once the command has finished. You can copy the files in this directory to a webserver like Apache or nginx, or you can easily deploy it to Firebase Hosting for example as well. It's just static files (HTML, CSS, JS, images, etc.).
You can find more information about deploying an Ionic app as a PWA (progressive web app) here. It also shows you how to deploy to Firebase Hosting, which has a free plan to get started with.

How to test SAPUI5 apps locally in apache tomacat installed in eclipse?

I am working on SAPUI5 app which was created long back and running successfully. Now I need to do some enhancements and for that I downloaded the app and uploaded in eclipse.
Now when I am running this app locally - It is not working as the XMLHTTP Request says 404 (Not Found) when accessing the backend OData service.
URI is : /sap/opu/odata/sap/Z****SRV";
I understand that I need to add http://<host>:<port> before URI.
But I cannot change it in all the places. I found out that we can write <param-value> in web.xml file but I did and still it is not working
Can someone guide me how?

How to access local mysql from chrome packages app

I am developing a chrome packaged app. There is already an VB application running with mysql. I want to access the same database but use chrome packaged app as client.
How to access local mysql server from chrome packages app using javascript ?
I am aware of IndexedDB.
You have two options:
Create a web service (e.g. some PHP pages) that talks to MySQL and allows your app to use it as a go-between
Write your own MySQL driver/communicator to communicate with it directly: http://developer.chrome.com/apps/socket.html
The first is the easiest and would take the form:
Your chrome app would use AJAX to communicate with the PHP pages (probably via "POST")
Your PHP pages would expect it to login, use SSL and then use a token to continue identification during a session
The PHP would have generic capabilities to do CRUD actions
The PHP would spit back JSON for the results
but the second option would make you a hero if you took the time to develop that and put it on sourceforge or github under a permissive open source license.