0.0.32 • Published 9 years ago

fluent-rest v0.0.32

Weekly downloads
6
License
LGPL-2.1
Repository
github
Last release
9 years ago

Fluent REST

A flexible fluent library that automatically creates Express compatible RESTful endpoints for any sql-bricks compatible database connection.

Build: master

Features

  • Fully RESTful endpoints without any weird query string madness or RPC masquerading as REST
  • Select the fields returned for entities using the fields query string parameter
  • Control the sort order of entities returned from collections via the sort query string parameter
  • Support full-text searches via the q query string parameter and a custom entity configurable via use_full_text_entity
  • Accept header/extensions can be easily honored in output formatters
  • Chainable output formatters, similar to Express middlewares, allow you to fully customize what is sent back to the client

Installation

$ npm install fluent-rest

Usage

// Standard Express app set up code would be here

import { rest_service_builder, hal_formatter } from 'fluent-rest/rest_service_builder';
let db = require('pg-bricks').configure('YOUR CONNECTION STRING');

let customers = builder
  .mount_at(app, '/api/v1')
  .resource('customers')
  .description('This is a collection of customers.')
  .for_entity(db, 'customer')
  .endpoint();
0.0.32

9 years ago

0.0.31

9 years ago

0.0.30

9 years ago

0.0.27

9 years ago

0.0.26

9 years ago

0.0.25

9 years ago

0.0.24

9 years ago

0.0.22

9 years ago

0.0.21

9 years ago

0.0.20

9 years ago

0.0.19

9 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago