feat(server): scaffolding du serveur Dart headless hexagonal (ticket #47)

Ajoute le nouveau paquet server/ (architecture hexagonale : api,
domain, application, infrastructure/postgres, infrastructure/security,
migrations, scripts) avec un premier endpoint GET /health. dart pub
get OK, dart analyze clean, dart test 1/1 vert, serveur démarré
manuellement et validé (GET /health -> 200 {"status":"ok"}).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 00:04:34 +02:00
parent 8d9d4f0cd3
commit cc1388cc9e
13 changed files with 552 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import 'dart:convert';
import 'package:gametime_server/api/router.dart';
import 'package:shelf/shelf.dart';
import 'package:test/test.dart';
void main() {
test('GET /health returns ok status', () async {
final handler = buildApiHandler();
final response = await handler(
Request('GET', Uri.parse('http://localhost/health')),
);
expect(response.statusCode, 200);
expect(response.headers['content-type'], contains('application/json'));
expect(jsonDecode(await response.readAsString()), {'status': 'ok'});
});
}