platform/packages/wings/example/shared.dart

23 lines
742 B
Dart
Raw Permalink Normal View History

2019-05-01 04:29:21 +00:00
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_wings/angel_wings.dart';
2021-06-20 12:37:20 +00:00
void main() async {
2019-05-01 04:29:21 +00:00
var app = Angel();
var wings1 = AngelWings.custom(app, startSharedWings);
var wings2 = AngelWings.custom(app, startSharedWings);
var wings3 = AngelWings.custom(app, startSharedWings);
var wings4 = AngelWings.custom(app, startSharedWings);
await wings1.startServer('127.0.0.1', 3000);
await wings2.startServer('127.0.0.1', 3000);
await wings3.startServer('127.0.0.1', 3000);
await wings4.startServer('127.0.0.1', 3000);
print(wings1.uri);
print(wings2.uri);
print(wings3.uri);
print(wings4.uri);
await wings1.close();
await wings2.close();
await wings3.close();
await wings4.close();
}