init project setup of the backend with dart and go as well as the frontend with nextjs

This commit is contained in:
2024-11-10 19:18:04 +01:00
parent d237057ac1
commit 338adc3b6f
15 changed files with 654 additions and 0 deletions
@@ -0,0 +1,20 @@
import 'dart:io';
import 'package:yaml/yaml.dart';
class Config {
final String databaseUrl;
final String port;
Config({required this.databaseUrl, required this.port});
static Future<Config> load() async {
final file = File('config.yaml');
final content = await file.readAsString();
final config = loadYaml(content);
return Config(
databaseUrl: config['database']['url'],
port: config['server']['port'],
);
}
}