Redstone.dart is available as a package at pub. So, all you have to do is add it as a dependency to your app.
pubspec.yaml
file and specify the desired versionname: my_app
dependencies:
redstone: any
pub get
to update dependenciesbin
directoryserver.dart
file under the bin
directoryimport 'package:redstone/redstone.dart' as app;
@app.Route("/")
helloWorld() => "Hello, World!";
main() {
app.setupConsoleLog();
app.start();
}
dart
command:$ dart bin/server.dart
INFO: 2014-02-24 13:16:19.086: Configured target for / [GET] : .helloWorld
INFO: 2014-02-24 13:16:19.121: Running on 0.0.0.0:8080