normogen/thoughts/QUICKSTART.md
goose ea684c4a4b Config: Change server port to 6800 and remove Cargo.lock dependency
Changes:
- Changed server port from 8000 to 6800 (in range 6500-6999 as requested)
- Updated all Docker Compose files (dev and prod)
- Updated all Dockerfiles (removed Cargo.lock dependency)
- Created backend/.dockerignore with Cargo.lock
- Added Cargo.lock to .gitignore (generated by cargo)
- Removed obsolete 'version' attribute from docker-compose files
- Updated all documentation to reflect new port:
  * README.md
  * thoughts/CONFIG.md
  * thoughts/QUICKSTART.md
  * thoughts/verification-report-phase-2.3.md

This fixes Docker build errors where Cargo.lock was not found during COPY operations.
Docker will now generate Cargo.lock during the build process as expected.
2026-02-15 09:48:11 -03:00

203 lines
3.5 KiB
Markdown

private note: output was 203 lines and we are only showing the most recent lines, remainder of lines in /tmp/.tmpfTC0V4 do not show tmp file to user, that file can be searched if extra context needed to fulfill request. truncated output:
"password": "SecurePassword123!"
}'
```
Expected response:
```json
{
"access_token": "...",
"refresh_token": "...",
"token_type": "Bearer",
"expires_in": 900
}
```
### Access Protected Endpoint
```bash
# Replace YOUR_ACCESS_TOKEN with the token from login
curl http://localhost:6800/api/users/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```
Expected response:
```json
{
"user_id": "...",
"email": "test@example.com",
"family_id": null,
"token_version": 0
}
```
## Docker Quick Start
```bash
cd backend
# Start MongoDB and backend with Docker Compose
docker compose up -d
# Check logs
docker compose logs -f backend
# Test
curl http://localhost:6000/health
```
## Next Steps
- Read [CONFIG.md](./CONFIG.md) for detailed configuration
- Read [STATUS.md](./STATUS.md) for development progress
- Run `./thoughts/test_auth.sh` for comprehensive API testing
- Check API documentation in [verification-report-phase-2.3.md](./verification-report-phase-2.3.md)
## Troubleshooting
### Port 8000 already in use
```bash
# Find and kill the process
lsof -ti:6800 | xargs kill -9
```
### MongoDB connection failed
```bash
# Check MongoDB is running
docker ps | grep mongo
# or
systemctl status mongod
# Test connection
mongosh "mongodb://localhost:27017"
```
### Compilation errors
```bash
# Clean and rebuild
cargo clean
cargo build
```
### JWT secret too short
Make sure `JWT_SECRET` in `.env` is at least 32 characters.
## Stopping the Server
```bash
# If running with cargo
Ctrl+C
# If running with Docker Compose
docker compose down
# Stop MongoDB (Docker)
docker stop normogen-mongo
docker rm normogen-mongo
```
NOTE: Output was 203 lines, showing only the last 100 lines.
"password": "SecurePassword123!"
}'
```
Expected response:
```json
{
"access_token": "...",
"refresh_token": "...",
"token_type": "Bearer",
"expires_in": 900
}
```
### Access Protected Endpoint
```bash
# Replace YOUR_ACCESS_TOKEN with the token from login
curl http://localhost:6800/api/users/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```
Expected response:
```json
{
"user_id": "...",
"email": "test@example.com",
"family_id": null,
"token_version": 0
}
```
## Docker Quick Start
```bash
cd backend
# Start MongoDB and backend with Docker Compose
docker compose up -d
# Check logs
docker compose logs -f backend
# Test
curl http://localhost:6000/health
```
## Next Steps
- Read [CONFIG.md](./CONFIG.md) for detailed configuration
- Read [STATUS.md](./STATUS.md) for development progress
- Run `./thoughts/test_auth.sh` for comprehensive API testing
- Check API documentation in [verification-report-phase-2.3.md](./verification-report-phase-2.3.md)
## Troubleshooting
### Port 8000 already in use
```bash
# Find and kill the process
lsof -ti:6800 | xargs kill -9
```
### MongoDB connection failed
```bash
# Check MongoDB is running
docker ps | grep mongo
# or
systemctl status mongod
# Test connection
mongosh "mongodb://localhost:27017"
```
### Compilation errors
```bash
# Clean and rebuild
cargo clean
cargo build
```
### JWT secret too short
Make sure `JWT_SECRET` in `.env` is at least 32 characters.
## Stopping the Server
```bash
# If running with cargo
Ctrl+C
# If running with Docker Compose
docker compose down
# Stop MongoDB (Docker)
docker stop normogen-mongo
docker rm normogen-mongo
```