1.1.0 • Published 8 years ago

js-data-server-setup v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

npm version semantic-release

Build Status JavaScript Style Guide

forthebadge forthebadge

forthebadge

js-data-server-setup

Usage

npm install js-data-server-setup

import jsDataServerSetup from 'js-data-server-setup'

const jsDataServer = new jsDataServerSetup({
  expressApp,
  container, // must be an instance of Container on the server
  adapter
})

// setup and individual resource
jsDataServer.setupResource({
  policies, // middleware/policy that is added to endpoint (see examples below)
  mapperConfig
})

// after you're all done setting up resources, you need to call mount()
jsDataServer.mount()


// -- or --

// setup all resources (mount() is invoked automatically, see api docs for details)
jsDataServer.setup(resources)

Examples

See /example dir in this repo for setup options.

1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago