js-data-express 1.0.0-rc.1

js-data logo


Slack Status npm version Circle CI npm downloads Coverage Status

Generate Express.js-compatible route middleware for js-data models.

To get started, visit http://js-data.io.

import 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')

Use mount()

// Mount store at "/"
mount(app, store)

// Mount store at "/api"
mount(app, store, '/api')

Adding as middleware

// Mount queryParser at "/"
// Mount store at "/"
app.use(new Router(store).router)



The MIT License (MIT)

Copyright (c) 2014-2016 js-data-express project authors