Skip to content

Commit

Permalink
Updating README
Browse files Browse the repository at this point in the history
Updating README

Updating README

Updating README

Updating README
  • Loading branch information
avoidwork committed Aug 2, 2014
1 parent 88f5535 commit 9e7b1a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Tensō

Tensō is a REST API facade for node.js, designed to simplify the implementation of APIs.

Tensō will handle the serialization & creation of hypermedia links, all you have to do is give it `Arrays` or `Objects`.

## Example
Creating an API with Tensō is as simple as three statements.

Expand Down Expand Up @@ -34,7 +36,8 @@ module.exports.get = {
```

## Responses
Responses will have a standard shape. Hypermedia (pagination, links, etc.) will be in `data` as `link:[ {"uri": "...", "rel": "..."}, ...]`. Pagination will also be present via the `Link` HTTP header.
Responses will have a standard shape. The result, and hypermedia will be in `data`. Hypermedia (pagination, links, etc.) will be in `data.link:[ {"uri": "...", "rel": "..."}, ...]`, & pagination will also be present via the `Link` HTTP header.
The result will be in `data.result`.

```json
{
Expand All @@ -49,6 +52,8 @@ Hypermedia is a prerequisite of REST, and is best described by the [Richard Matu
relationships, and create the appropriate Objects in the `link` Array, as well as the `Link` HTTP header. Object keys that match this pattern: `/_(guid|uuid|id|uri|url)$/` will be considered
hypermedia links.

For example, if the key `user_id` was found, it would be mapped to `/users/:id` with a link `rel` of `alternative`.

## Configuration
This is a sample configuration for Tensō, without authentication or SSL. This would be ideal for development, but not production! Enabling SSL is as easy as providing file paths for the two keys.

Expand Down

0 comments on commit 9e7b1a1

Please sign in to comment.