Files
fx-test/docs/quickstart.md

61 lines
1.6 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🚀 Quick Start Guide
Follow this stepbystep guide to spin up the **fx-test** service stack locally. The instructions assume you have Docker, DockerCompose, and Git installed.
## 1⃣ Clone the Repository
```bash
git clone https://git.vish.gg/Vish/fx-test.git
cd fx-test
```
## 2⃣ Build & Deploy
The repository uses DockerCompose stacks wrapped in a **GitOps** pattern. The simplest way to start the stack locally is with the provided `run_dev.sh` script.
```bash
./fluxer/scripts/run_dev.sh
```
* The script pulls the latest code, compiles the Erlang project, builds the Docker image, and spins up the stack via `docker-compose`.
## 3⃣ Verify the Service
Once the containers are running, you can verify the API endpoints:
```bash
# Port 8080 WS API
curl http://localhost:8080
# Port 8090 HTTP API
curl http://localhost:8090/health
```
Both should respond with JSON payloads confirming the service is healthy.
## 4⃣ Interacting with the WebSocket
Use `wscat` (or any `ws` client) to open a connection:
```bash
npm install -g wscat
wscat -c ws://localhost:8080
```
Send a simple test message:
```json
{"type":"ping"}
```
You'll receive a `pong` response if the relay is working.
---
### Troubleshooting Tips
| Symptom | Likely Cause | Fix |
|---------|--------------|-----|
| Containers exit instantly | Build step failed | Check CI logs, rebuild locally with `make` |
| HTTP endpoints return **503** | Health check script misconfigured | Verify `/fluxer/config/health_check.json` |
| WebSocket not reachable | Port blocked | Ensure OS firewall allows 8080 |