Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
/ dart-services Public archive

The server backend for a web based interactive Dart service

License

Notifications You must be signed in to change notification settings

dart-archive/dart-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dart Services

Note: This is no longer the source of truth for Dart Services. Please see github.com/dart-lang/dart-pad/tree/main/pkgs/dart_services for the new source of truth for this project.

A server backend to support DartPad.

Build Status Coverage Status Uptime Status

What is it? What does it do?

This project is a small, stateless Dart server, which powers the front-end of DartPad. It provides many of DartPad's features, including static analysis (errors and warnings), compilation to JavaScript, code completion, dartdoc information, code formatting, and quick fixes for issues.

Getting set up

This project is built with grinder. To install, please run:

$ dart pub global activate grinder

The dart-services v2 API is defined in terms of Protobuf, which requires the installation of the Protobuf protoc compiler. Please see Protocol Buffers for detailed installation instructions. On macOS, you may also install with Homebrew via:

$ brew install protobuf

The Dart protoc plugin is also required for the above protoc compiler to generate Dart code. To install, please run:

$ dart pub global activate protoc_plugin

Initialize Flutter

The Flutter SDK needs to be downloaded and setup.

$ dart pub install
$ dart run tool/update_sdk.dart stable

Build the subsidiary files

The Dart Services server depends on generated files. Run the following to generate all the required binaries.

$ FLUTTER_CHANNEL="stable" grind deploy

Running

To run the server, run:

$ FLUTTER_CHANNEL="stable" grind serve

The server will run from port 8082 and export several JSON APIs, like /api/compile and /api/analyze.

Testing

To run tests:

FLUTTER_CHANNEL="stable" grind test for unit tests

or:

grind deploy for all tests and checks.

dart-services requires the redis package, including the redis-server binary, to be installed to run tests. sudo apt-get install redis-server will install this on Ubuntu, but see Redis' Quick Start guide for other platforms.

Related projects

See also the dart-pad repo.

Issues and bugs

Please file reports on the GitHub Issue Tracker for DartPad.

License and Contributing

Contributions welcome! Please read this short guide first. You can view our license here.

About

The server backend for a web based interactive Dart service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published