Skip to content

Simple Object.js ORM example copied from Vincit/objection.js

Notifications You must be signed in to change notification settings

bahmutov/objection-example

Repository files navigation

objection-example renovate-app badge CircleCI

Simple Object.js ORM example copied from Vincit/objection.js

This example was copied from folder examples/express-es7 of github.com/Vincit/objection.js. See Objection.js docs

The original client code that makes HTTP requests is in client.js but for this demo we are going to use Cypress Test Runner with @bahmutov/cy-api plugin.

Tests

Install

npm ci

Run

To start local server and open Cypress

npm run dev

Tests

There are several specs in cypress/integration folder

  • movies-spec.js shows how to add a new movie, and how the API checks for required fields to be present
  • spec.js shows complex calls to insert multiple entities in a single call, updating multiple objects using "upsert"

More info

Small print

Author: Gleb Bahmutov <gleb.bahmutov@gmail.com> © 2019

Original License: See github.com/Vincit/objection.js Additions showing logs and Cypress tests under MIT License - do anything with the code, but don't blame me if it does not work.

Support: if you find any problems with this module, email / tweet / open issue on Github

About

Simple Object.js ORM example copied from Vincit/objection.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published