Saturday, January 30, 2021

code-server

オープンソースのアプリ。ブラウザ上でVS codeを動かすことができる。
$ sudo apt update $ && sudo apt upgrade -y

インストール

$ curl -fsSL https://code-server.dev/install.sh | sh

code-serverの起動(&をつけてbgで起動、127.0.0.1へ繋げられるように。)

$ code-server &
 info  Wrote default config file to ~/.config/code-server/config.yaml
 info  code-server 3.8.0 c4610f7829701aadb045d450013b84491c30580d
 info  Using user-data-dir ~/.local/share/code-server
 info  Using config file ~/.config/code-server/config.yaml
 info  HTTP server listening on http://127.0.0.1:8080 
 info    - Authentication is enabled
 info      - Using password from ~/.config/code-server/config.yaml
 info    - Not serving HTTPS 

別のターミナルを起動し、以下のコマンドを入力

cat ~/.config/code-server/config.yaml
bind-addr: 127.0.0.1:8080
auth: password
password: d7b348f241xxxxxxxxx
cert: false

初回起動時にランダムに生成されるパスワードを確認する。

ChromeブラウザのURL http://127.0.0.1:8080 または http://localhost:8080 へアクセス




config.yamlに記載のパスワード(上記catで確認したもの)を入力すればOK。






参考(リンク



No comments:

Post a Comment