Redstone.dart is available as a package at pub. So, all you have to do is add it as a dependency to your app.

name: my_app
 dependencies:
   redstone: any
  • Run pub get to update dependencies
  • Create a bin directory
  • Create a server.dart file under the bin directory
import 'package:redstone/redstone.dart' as app;

@app.Route("/")
helloWorld() => "Hello, World!";

main() {
  app.setupConsoleLog();
  app.start();
}

Source code

  • To run the server, create a launch configuration in WebStorm, or use the 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
  • Now head over to http://127.0.0.1:8080/, and you should see your hello world greeting.