Registered as js-data-express
in NPM.
Examples
npm i --save js-data-express@beta js-data@beta
import {Router} from 'js-data-express'
const adapter = new Router()
var Router = require('js-data-express').Router
var adapter = new Router()
Members
-
<static> mount
-
Convenience method that mounts queryParser and a store.
Examplesimport express from 'express' import {mount, queryParser, Router} from 'js-data-express' import {Container} from 'js-data' const app = express() const store = new Container() const UserMapper = store.defineMapper('user') const CommentMapper = store.defineMapper('comment') mount(app, store)
mount(app, store, '/api')
-
<static> Router
-
Router class.
DetailsType Source See Constructor index.js, line 146 - Router
Examplesimport {Router} from 'js-data-express' const adapter = new Router()
var Router = require('js-data-express').Router var adapter = new Router()
-
<static> version
-
Details of the current version of the
js-data-express
module.Properties:
Name Type Description version.full
String The full semver value.
version.major
Number The major version number.
version.minor
Number The minor version number.
version.patch
Number The patch version number.
version.alpha
String | Boolean The alpha version value, otherwise
false
if the current version is not alpha.version.beta
String | Boolean The beta version value, otherwise
false
if the current version is not beta.Examplesimport {version} from 'js-data-express' console.log(version.full)
var version = require('js-data-express').version console.log(version.full)