LoginSignup
0
0

More than 3 years have passed since last update.

Dart と Flutter 用の Code-Server を VPS で

Last updated at Posted at 2021-02-13

VPS上にCode-server を、立ち上げて
Flutter For Web の 開発してみた..

VSCode Plugin も 使えます!!

VPS 上に Code-server を立ち上げる

$ apt-get update
$ curl -fsSL https://code-server.dev/install.sh | sh
$ systemctl enable --now code-server@root
// Created symlink /etc/systemd/system/default.target.wants/code-server@root.service → /lib/systemd/system/code-server@.service.

パスワードの設定とか (Optional)

$ vi /root/.config/code-server/config.yaml
bind-addr: 0.0.0.0:8080
auth: password
password: MyFlutter-0213f
cert: false                                                     
$ systemctl restart code-server@root

Screen Shot 2021-02-14 at 0.00.10.png

Flutter を インストール

$ apt-get install curl -y
$ apt-get install git -y
$ apt-get install unzip -y
$ apt-get install zip -y
$ git clone https://github.com/flutter/flutter.git
$ export PATH="$PATH:`pwd`/flutter/bin"
$ flutter doctor

Flutter Web を 設定

$ flutter channel beta
$ flutter upgrade
$ flutter config --enable-web
$ flutter devices

サンプルを試してみよう

$ flutter create myapp
$ cd myapp
$ flutter build web
$ flutter run -d web-server  --web-port=18080 --web-hostname=0.0.0.0

Screen Shot 2021-02-13 at 21.34.46.png

PS

以下でも書いてます

Conoha の 4GBプランを試しました
快適です
https://www.conoha.jp/vps/?btn_id=header_vps

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0