Skip to content

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages