Skip to content

alarner/perk-many-to-many

Repository files navigation

Many to many relationship example with Bookshelf.js

This is a simple example of how to use many to many relationships with Bookshelf.js. This example was put together using Perk - a well documented set of tools for building node web applications.

This example was created for the Perk Documentation on many to many relationships

To run

  1. Git clone this repo
  2. cd into project and npm install
  3. Install knex: npm install -g knex
  4. With PostgreSQL: createdb many-to-many
  5. Boot up the server npm run dev
  6. Run migrations: knex migrate:latest
  7. Run seed files: knex seed:run
  8. Fill in database credentials and random string for session secret.
  9. Go to http://localhost:3000

Important files

Look at these files for the necessary pieces to establish a many to many relationship using Bookshelf.js.

Migrations

Models

Queries

Seed data

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published