PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, September 1, 2022

[FIXED] How to deploy a remove development server with Flutter Web?

 September 01, 2022     flutter-web, nginx-reverse-proxy     No comments   

Issue

I sometimes develop remotely thanks to vscode-remote and nginx reverse proxy

flutter run -d chrome --web-port=4000

I want to open flutter web dev server on other ip than http://localhost:4000

I can do that with nginx and webpack-dev-server

There is no way to open in other browser except chrome (some proxy dependencies interal from chrome)

nginx config file

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/html;

    index index.html index.htm index.nginx-debian.html;

    server_name _;

    location / {
        try_files $uri $uri/ =404;
        proxy_pass http://localhost:4000;
        proxy_set_header Host $host;
    }
}

Solution

If you are looking for opening the flutter web app in other browser during development this is not possible as of now. Check the note here on top of this link. One option is to run flutter build web and host the build\web folder. Once hosted this can be opened in any browser like Firefox or so. But I guess you cannot debug in this mode.



Answered By - Abhilash Chandran
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing