-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: instructions for how to set up a server+client development environment #4
Comments
WebSSH2 Development GuideThis guide explains how to set up and run the WebSSH2 client and server components for development. Prerequisites
Project Setup
mkdir webssh2-dev
cd webssh2-dev
# Clone the client repository
git clone https://github.com/billchurch/webssh2_client.git
# Clone the server repository
git clone https://github.com/billchurch/webssh2.git webssh2_server
# Install client dependencies
cd webssh2_client
npm install
# Install server dependencies
cd ../webssh2_server
npm install Development WorkflowStarting the Server Component
cd webssh2_server
npm run watch This will:
Starting the Client Component
cd webssh2_client
npm run watch This will:
The development configuration is automatically injected through webpack.common.js when webssh2Config: {
socket: {
url: 'http://localhost:2222',
path: '/ssh/socket.io'
},
ssh: {
port: 22
}
} Accessing the Development Environment
Development ArchitecturesequenceDiagram
participant Browser as Browser<br/>(localhost:3000)
participant Client as WebSSH2 Client<br/>(Port 3000)
participant Server as WebSSH2 Server<br/>(Port 2222)
participant SSH as SSH Server<br/>(Port 22)
Note over Browser,SSH: Development Data Flow
Browser->>+Client: HTTP Request
Client->>-Browser: Serve Client Files
Browser->>+Client: WebSocket Connection
Client->>+Server: Socket.IO Connection
Server->>+SSH: SSH Connection
Note over Browser,SSH: Bidirectional Communication
SSH-->>-Server: SSH Data
Server-->>-Client: Socket.IO Events
Client-->>-Browser: WebSocket Events
File Watching and Auto-ReloadBoth client and server components support file watching and automatic reloading:
Important Notes
TroubleshootingIf you encounter issues:
Building for ProductionWhen ready to build for production: cd webssh2_client
npm run build This will create production-ready files in the |
via @israel-tsadok-silk from billchurch/webssh2#368
peer issue: billchurch/webssh2#370
The text was updated successfully, but these errors were encountered: