electerm / electerm-web

Running electerm as web app
https://electerm.html5beta.com
MIT License
66 stars 11 forks source link
electerm react serialport sftp ssh telnet terminal

δΈ­ζ–‡

electerm-web Tweet

This is web app version of electerm app, running in browser, almost has the same features as the desktop version.

GitHub version license JavaScript Style Guide Get it from the Snap Store Get it from the Microsoft Store GitHub Sponsors

Open-sourced terminal/ssh/telnet/serialport/sftp client(linux, mac, win).

Features

Download

todo

Upgrade

todo

Support

Would love to hear from you, please tell me what you think, submit an issue, Start a new discussion, create/fix language files or create pull requests, all welcome.

Sponsor this project

github sponsor

https://github.com/sponsors/electerm

kofi

https://ko-fi.com/zhaoxudong

wechat donate

wechat donate

Prerequisites

One line script to deploy from source code

for Linux or Mac

curl -o- https://electerm.html5beta.com/scripts/one-line-web.sh | bash

or

wget -qO- https://electerm.html5beta.com/scripts/one-line-web.sh | bash

for Windows

Invoke-WebRequest -Uri "https://electerm.html5beta.com/scripts/one-line-web.bat" -OutFile "one-line-web.bat"
cmd.exe /c ".\one-line-web.bat"

Deploy from docker image

Check electerm-web-docker

Dev

# tested in ubuntu16.04+/mac os 10.13+ only
# needs nodejs/npm, suggest using nvm to install nodejs/npm
# https://github.com/creationix/nvm
# with nodejs 18.x

git clone git@github.com:electerm/electerm-web.git
cd electerm-web
cp .sample.env .env
# edit DB_PATH to set db path, default path ./database
# to use same data as desktop electerm
# for Mac OS DB_PATH="/Users/<your-user-name>/Library/Application Support/electerm"
# for Linux OS DB_PATH="/home/<your-user-name>/.config/electerm"
# for Windows OS DB_PATH="C:\\Users\\<your-user-name>\\AppData\\Roaming\\electerm"

npm i

# start webpack dev server
npm start

# in a separate terminal session run app
npm run dev

#then visit http://127.0.0.1:5580 with browser

# code format check
npm run lint

# code format fix
npm run fix

Build && run in production

npm run build

# run production server
npm run prod

# or ./build/bin/run-prod.sh

#then visit http://127.0.0.1:5577 with browser

Run in server

# Edit .env, set
ENABLE_AUTH=1 # if not enabled, everyone can use it without login
SERVER_SECRET=some-server-secret
SERVER_PASS=some-login-pass-word
SERVER=http://xxx.com # if you want to bind domain
CDN=http://xxx.com # if you want to use cdn serve static files

# run prod app
./run-electerm-web.sh

# Check examples/nginx.conf examples/nginx-ssl.conf  for domain binding nginx conf example

Test

npx playwright install --with-deps chromium
# or with a proxy if needed
HTTPS_PROXY=http://127.0.0.1:1087 npx playwright install --with-deps chromium
# then edit .env, edit test related env
npm run test

License

MIT