Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Upstart configuration file and setup instructions for spawning a server-side Dart app
Dart
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
LICENSE
README.md
my-server.conf
webhook.dart

README.md

dart-upstart

Upstart configuration file (my-server.conf) and setup instructions (below) for spawning a Dart server, and a web hook for a simple continuous deployment (CI) setup.

Here's a blog post with more details: Dart + CI with a few lines of code

Why?

Dart supports server-side development. See for instance HttpServer.

Creating an Upstart config is an easy and lightweight way to spawn your server-side Dart app. It'll also respawn if necessary, e.g. in case of an uncaught exception.

If you prefer to host in Apache, have a look at mod_dart.

Setup instructions

wget http://storage.googleapis.com/dart-archive/channels/stable/release/latest/editor/darteditor-linux-x64.zip

unzip darteditor-linux-x64.zip

cp dart/dart-sdk/bin/dart /usr/bin
  • Install Upstart, if necessary

  • Copy my-server.conf to /etc/init (edit it beforehand and make sure it points to your .dart file)

  • To start the service now:

start my-server

That's it!

Optionally, create a deployment script and set up a web hook for continuous deployment.

Next steps

  • Logging: right now just appending to log file in /var/log, should use something better such as syslog.

Contributors

Something went wrong with that request. Please try again.