Sourcevoid Docs

Everything you need to get started with Sourcevoid, pick your favorite language and let's get started!

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Sourcevoid supports Dart out of the box, Dart was the first supported language on the platform and we use Dart a lot internally at Sourcevoid. Both the Sourcevoid cloud management interface and our homepage that you are reading right now are powered by Dart. The management interface is a client side app connecting to a Dart API backend that acts as a gateway into our lower level core platform.


Building a REST API with Dart and getting it up and running on Sourcevoid is easy. Sourcevoid's flexible build system and platform architecture makes it so that we support any Dart framework that you can run on your local computer.

Dart server hello world

Here is a simple "Hello World" program using the Shelf web server:

import 'dart:async';
import 'package:shelf/shelf.dart';
import 'package:shelf/shelf_io.dart';

Future main() async {
  var server = await serve(handler, 'localhost', 8080);
  print('Serving at http://${}:${server.port}');

Response handler(Request request) {
  return new Response.ok('Hello World');

The easiest way to deploy a Dart server app is to follow the Dart standard application package layout (as defined by
the pub documentation)
and the system will autodetect and generate the required Dart system configuration. To do this simply keep your
pubspec.yaml file at the top level of your deployed source code and put your server's main function in a file called
bin/server.dart (where bin is the name of the directory bin). You can also use your own sourcevoid.yaml config
file where you specify runtime: dart and your other prefered settings, you can see an example of a Dart server config
further down on this page. To deploy client side Dart apps please see the static

Dart server side frameworks

Below are some Dart server side frameworks that you can try out. This is not a complete list as Sourcevoid support any
Dart frameworks or programs that you can run locally. We simply provide these links as a starter point if you are new
to server development on the Dart platform.

Dart auto detection

Sourcevoid lets you choose if you want the system to implicitly detect and generate your Sourcevoid configuration based
on your source code's structure or if you want to explicitly define it using our sourcevoid.yaml config file.
When no config file is found inside an environments specified source code root the system will try to auto detect a
runtime. Dart is detected by the presence of a pubspec.yaml file, when no sourcevoid.yaml file is present and the
system detect a Dart server project the default Dart server config as shown below will be used. If you want to change
the commands being run by the build pipeline or change the startup command just add a file called sourcevoid.yaml
with your prefered settings and the system will pick up the changes on future deployments.

Dart server app config

runtime: dart
version: latest

  - pub get

start: dart bin/server.dart

For more details about the sourcevoid.yaml config file please see the structure section.

Getting started tutorials

Check out more Dart getting started tutorials on Github: