init project setup of the backend with dart and go as well as the frontend with nextjs
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:backend_dart/infrastructure/config/config.dart';
|
||||
|
||||
class Server {
|
||||
final Config config;
|
||||
|
||||
Server(this.config);
|
||||
|
||||
Future<void> start() async {
|
||||
final server =
|
||||
await HttpServer.bind(InternetAddress.anyIPv4, int.parse(config.port));
|
||||
print('Listening on port ${config.port}');
|
||||
|
||||
await for (HttpRequest request in server) {
|
||||
request.response
|
||||
..write('Welcome to ActaTempus!')
|
||||
..close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user