This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Installation
luizmineo edited this page May 29, 2014
·
5 revisions
Redstone.dart is available as a package at pub. So, all you have to do is add it as a dependency to your app.
- Create a new Dart package (manually or through Dart Editor)
- Add Redstone.dart as a dependency in
pubspec.yaml
file
name: my_app
dependencies:
redstone: any
- Run
pub get
to update dependencies - Create a
bin
directory - Create a
server.dart
file under thebin
directory
import 'package:redstone/server.dart' as app;
@app.Route("/")
helloWorld() => "Hello, World!";
main() {
app.setupConsoleLog();
app.start();
}
- To run the server, create a launch configuration in Dart Editor, 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.
-
Quick Start Guide
-
Reference
-
Serialization
-
Databases
-
MVC
-
Web Sockets