https://github.com/phukon/guava-term
Interact with your Vercel deployment's build container through it's bash terminal.
https://github.com/phukon/guava-term
bash linux terminal
Last synced: 7 months ago
JSON representation
Interact with your Vercel deployment's build container through it's bash terminal.
- Host: GitHub
- URL: https://github.com/phukon/guava-term
- Owner: phukon
- License: mit
- Created: 2024-03-27T20:29:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-29T20:28:47.000Z (over 1 year ago)
- Last Synced: 2025-01-27T21:26:15.808Z (8 months ago)
- Topics: bash, linux, terminal
- Language: JavaScript
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](https://vercel.com/docs/deployments/builds) }
For a Next.js implementation, check [guava-next](https://github.com/phukon/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.js`to 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.