Skip to content

Upstart configuration file and setup instructions for spawning a server-side Dart app

License

Notifications You must be signed in to change notification settings

dartist/dart-upstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Upstart configuration file and setup instructions for spawning a server-side Dart app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages