Skip to content

alarner/perk-many-to-many

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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