Reputation: 559
I am new in flutter web development and I need little help from you people. I am building an app in flutter web and in the domain of that app I want to add the prefix for example:
(shop.)localhost.com
or
(user123341.)localhost.com.
If you people have any small information about this please share your information. It will really appreciated.
Upvotes: 3
Views: 1077
Reputation: 7983
Yes it is completely possible to upload a Flutter Web App to a subdomain as Flutter compiles to Javascript and HTML. You can upload it to any subdomain you wish. But in your case you want to do that using localhost
.
You need to understand that localhost is not purely a domain and you can't add a subdomain to it. But there are some workarounds to do that:
Based on this answer, you can try adding subdomains to the localhost as illustrated below.
C:\Windows\System32\drivers\etc\hosts
And append lines like the following to it:
127.0.0.1 example.com
127.0.0.1 subdomain.example.com
Upvotes: 3