Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

ChildrenOfUr/coUserver

Repository files navigation

coUserver

Children of Ur's Dart-based web server

This repository contains the source code for Children of Ur's Dart-based web server.

Codeship Status for ChildrenOfUr/coUserver codecov.io

License

Children of Ur is based on Tiny Speck's browser-based game, Glitch™. The original game's elements have been released into the public domain. For more information on the original game and its licensing information, visit glitchthegame.com.

License information for other assets used in Children of Ur can be found in ATTRIBUTION.md.

Usage

The code is live at childrenofur.com.

If you want to run it locally or on your own server, you'll need to have an environment with Dart installed. Note that this repository does not currently contain any prebuilt files, so you'll also need a development environment. See Contributing below.

Contributing

coUserver is written in Dart, so the first thing you'll need to do (if you haven't already) is to install it.

Set up a development environment

Install Dart

Install an IDE of your choice

  • Atom is free, just make sure to install the dartlang package.
  • WebStorm is not free, but includes Dart support.

Get dependencies

You'll only need to do this when you first get the code, and later on if we update the dependencies (pubspec.yaml changes).

  1. Run pub get from the server directory.
  2. Sit back and wait a few minutes.

Run locally

The server requires some configuration to be able to attach to external services in a file named lib/API_KEYS.dart. There's a non-working example in the lib directory named API_KEYS.dart.example. Contact someone on the development team for working values.

dart declarations.dart --no-load-cert

But is it really running?

Load http://localhost:8181/serverStatus in a browser or using curl and you should see output like

{"numPlayers":0,"playerList":[],"numStreetsLoaded":0,"streetsLoaded":[],"bytesUsed":0,"cpuUsed":29.4,"uptime":"0:00:29"}