Skip to content

Latest commit

 

History

History
65 lines (39 loc) · 2.03 KB

README.md

File metadata and controls

65 lines (39 loc) · 2.03 KB
 Interact with your Vercel deployment's build container through it's bash terminal.

guava-term

Interact with your Vercel deployment's build container through it's bash terminal
HTTP · WebSocket ·


This project enables remote interaction with a Vercel Build container through it's bash terminal using child processes. I initially wrote this to explore the remote environment and use the /temp directory of a Vercel Build Docker container. {see more @ Vercel Builds }

For a Next.js implementation, check guava-next

HTTP implementation

dir: plain-http + root index.js Everything is stateless on the HTTP implementation. The child process is killed after every command or should I say for every new command, a new child process is spun up.

WebSocket implementation

dir: websocket All commands are piped to the same child process.

Getting Started

To set up and run the application, follow these steps:

HTTP

  1. pnpm install
  2. Set HOST_NAME in .env
  3. Then node index.js to spin up the server.
  4. Finally node plain-http/hclient.js to start the client.

Websocket

  1. Run node websocket/index.js to spin up the server.
  2. Point to your server address in websocket/client.js
  3. Then node websocket/client.jsto use the websocket client.

Usage

Server Side

  1. Run the server:

    node hclient.js

    The server will start listening on port 8080.

Client Side

  1. Run the client:

    node client.js

    This will prompt you to enter a command.

  2. Enter the desired command and press Enter.

    The command will be sent to the server, executed in a bash terminal, and the output will be displayed in the client console.