Skip to content

Commit

Permalink
clean slate
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed May 9, 2016
1 parent 4e64554 commit 88e4811
Show file tree
Hide file tree
Showing 26 changed files with 25 additions and 1,011 deletions.
7 changes: 2 additions & 5 deletions .editorconfig
@@ -1,16 +1,13 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true


[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Use tabs in JavaScript, CoffeeScript and JSON.
[**.{coffee,js,json}]
# Use tabs in JavaScript.
[**.{js}]
indent_style = tab
indent_size = 4
4 changes: 0 additions & 4 deletions .gitignore
Expand Up @@ -4,7 +4,3 @@ Thumbs.db
.nvm-version
node_modules
npm-debug.log

vbb-rest.sublime-workspace
server.crt
server.key
12 changes: 0 additions & 12 deletions .npmignore

This file was deleted.

82 changes: 6 additions & 76 deletions README.md
@@ -1,90 +1,20 @@
# vbb-rest
# *vbb-rest*

*vbb-rest* is an HTTP server that proxies all requests to the **Berlin & Brandenburg public transport (VBB) API**. Using the [`vbb` API client library](https://github.com/derhuerst/vbb), it wraps the verbose HAFAS interface in a straightforward REST API.

*vbb-rest* is written in CoffeeScript and embraces [prototypal programming](http://davidwalsh.name/javascript-objects-deconstruction#simpler-object-object), making it easily extendable. It is [MIT-licensed](LICENSE).
***vbb-rest* is a public transport REST API**, a clean alternative to the [VBB HAFAS API](https://github.com/derhuerst/vbb-hafas).

[![npm version](https://img.shields.io/npm/v/vbb-rest.svg)](https://www.npmjs.com/package/vbb-rest)
[![dependency status](https://img.shields.io/david/derhuerst/vbb-rest.svg)](https://david-dm.org/derhuerst/vbb-rest)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/vbb-rest.svg)


## Installing

## Installing (globally)

```shell
npm install -g vbb-rest
```

You can now start the *vbb-rest* server wherever you want.

todo


## Usage

The server will forward the [VBB API token](http://www.vbb.de/de/article/webservices/schnittstellen-fuer-webentwickler/5070.html#testserver) from the HTTP `X-API-Key` field, so get one for testing.

```shell
vbb-rest -c <cert> -k <key> # run the server in "live mode"
```

or

```shell
vbb-restd start -c <cert> -k <key> # start/stop the server in the background
```


### `vbb-rest`

```
Usage:
vbb-rest -c <cert> -k <key> [-p <port>]
Arguments:
-c, --cert The SSL certificate.
-k, --key The SSL key.
Options:
-p, --port Where the server will listen. Default: 8000
```


### `vbb-restd`

```
Usage:
vbb-restd start -c <cert> -k <key> [-p <port>]
vbb-restd stop <id>
Arguments:
-c, --cert The SSL certificate.
-k, --key The SSL key.
id The server process id.
Options:
-p, --port Where the server will listen. Default: 8000
```

When you `start` a server, it will print its process id.

```shell
vbb-restd start -c <cert> -k <key>
info: The server <id> has been started.
```

You can use the `id` later to `stop` the server.

```shell
$ vbb-restd stop <id>.
info: The server <id> has been stopped.
```



## Documentation

- [*vbb-rest* HTTP documentation](docs/index.md)

todo


## Contributing
Expand Down
53 changes: 0 additions & 53 deletions bin/vbb-rest

This file was deleted.

94 changes: 0 additions & 94 deletions bin/vbb-restd

This file was deleted.

48 changes: 0 additions & 48 deletions docs/autocomplete.md

This file was deleted.

0 comments on commit 88e4811

Please sign in to comment.