787 B
787 B
Cyber Hybrid Hub API
Postgres-backed profile API for the Flutter app.
Setup
-
Create the database (once):
createdb cyberhybridhub -
Copy and edit environment variables:
cp .env.example .env -
Install dependencies and run (from this
server/directory):dart pub get dart run bin/server.dart
The API listens on http://localhost:3000 by default (PORT in .env).
Endpoints
| Method | Path | Auth |
|---|---|---|
GET |
/v1/me/profile |
Authorization: Bearer <Firebase ID token> |
PUT |
/v1/me/profile |
same |
Flutter client
Run the app with the API URL (defaults to http://localhost:3000):
flutter run --dart-define=API_BASE_URL=http://localhost:3000