Cmake install into root
This commit is contained in:
parent
9e92eb2830
commit
1a7bba516d
3 changed files with 9 additions and 3 deletions
|
@ -4,3 +4,4 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_dart_utils/cmake"
|
|||
find_package(Dart REQUIRED)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
add_subdirectory(lib/src)
|
||||
install(TARGETS angel_wings LIBRARY DESTINATION "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
|
|
@ -7,13 +7,17 @@ import 'package:logging/logging.dart';
|
|||
import 'package:pretty_logging/pretty_logging.dart';
|
||||
|
||||
main() async {
|
||||
var app = Angel();
|
||||
hierarchicalLoggingEnabled = true;
|
||||
|
||||
var logger = Logger.detached('wings')
|
||||
..level = Level.ALL
|
||||
..onRecord.listen(prettyLog);
|
||||
var app = Angel(logger: logger);
|
||||
var wings = AngelWings(app);
|
||||
var fs = LocalFileSystem();
|
||||
var vDir = CachingVirtualDirectory(app, fs,
|
||||
source: fs.currentDirectory, allowDirectoryListing: true);
|
||||
|
||||
app.logger = Logger('wings')..onRecord.listen(prettyLog);
|
||||
app.mimeTypeResolver.addExtension('yaml', 'text/x-yaml');
|
||||
|
||||
app.get('/', (req, res) => 'WINGS!!!');
|
||||
|
@ -21,9 +25,10 @@ main() async {
|
|||
await req.parseBody();
|
||||
return req.bodyAsMap;
|
||||
});
|
||||
|
||||
app.fallback(vDir.handleRequest);
|
||||
app.fallback((req, res) => throw AngelHttpException.notFound());
|
||||
|
||||
await wings.startServer(InternetAddress.loopbackIPv6, 3000);
|
||||
await wings.startServer(InternetAddress.loopbackIPv4, 3000);
|
||||
print('Listening at ${wings.uri}');
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/Users/thosakwe/Source/Angel/wings/lib/src/libangel_wings.dylib
|
BIN
libangel_wings.dylib
Executable file
BIN
libangel_wings.dylib
Executable file
Binary file not shown.
Loading…
Reference in a new issue