Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dart-lang/dart-services
The server backend for a web based interactive Dart service
https://github.com/dart-lang/dart-services
Last synced: 3 months ago
JSON representation
The server backend for a web based interactive Dart service
- Host: GitHub
- URL: https://github.com/dart-lang/dart-services
- Owner: dart-archive
- License: bsd-3-clause
- Archived: true
- Created: 2014-12-15T23:32:22.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T01:08:48.000Z (over 1 year ago)
- Last Synced: 2024-07-18T17:26:01.160Z (4 months ago)
- Language: Dart
- Homepage:
- Size: 2.39 MB
- Stars: 312
- Watchers: 51
- Forks: 92
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
[github.com/dart-lang/dart-pad/tree/main/pkgs/dart_services]: https://github.com/dart-lang/dart-pad/tree/main/pkgs/dart_services
A server backend to support DartPad.
[![Build Status](https://github.com/dart-lang/dart-services/workflows/dart-services/badge.svg)](https://github.com/dart-lang/dart-services/actions?workflow=dart-services)
[![Coverage Status](https://coveralls.io/repos/dart-lang/dart-services/badge.svg?branch=master)](https://coveralls.io/r/dart-lang/dart-services?branch=master)
[![Uptime Status](https://img.shields.io/badge/uptime-Pingdom-blue.svg)](http://stats.pingdom.com/8n3tfpl1u0j9)## 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](https://pub.dev/packages/grinder). To install, please run:
```bash
$ 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](https://developers.google.com/protocol-buffers/) for detailed
installation instructions. On macOS, you may also install with Homebrew via:```bash
$ brew install protobuf
```The Dart protoc plugin is also required for the above `protoc` compiler
to generate Dart code. To install, please run:```bash
$ dart pub global activate protoc_plugin
```## Initialize Flutter
The Flutter SDK needs to be downloaded and setup.
```bash
$ 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.
```bash
$ FLUTTER_CHANNEL="stable" grind deploy
```## Running
To run the server, run:
```bash
$ 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](https://redis.io/topics/quickstart) for other platforms.## Related projects
See also the [dart-pad](https://github.com/dart-lang/dart-pad) repo.
## Issues and bugs
Please file reports on the
[GitHub Issue Tracker for DartPad](https://github.com/dart-lang/dart-pad/issues).## License and Contributing
Contributions welcome! Please read this short
[guide](https://github.com/dart-lang/dart-services/wiki/Contributing) first.
You can view our license
[here](https://github.com/dart-lang/dart-services/blob/master/LICENSE).