DouglasdeMoura / active-record-javascript-example

This is naive implementation of the Active Record pattern in JavaScript with SQLite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Active Record Example

This is naive implementation of the Active Record pattern in JavaScript with SQLite. Also, there is a handmade migration system to make this demo be more pleasant.

├── README.md
├── database
│   ├── migration.js
│   └── migrations
│       ├── 0-create-books-table.js
│       └── 1-seed-books-table.js
├── package-lock.json
├── package.json
└── src
    ├── config
    │   └── db.js
    ├── index.js
    └── models
        └── active-record.js
        └── book.js

How to run

npm i
npm run db:migrate up all
npm run start

Reset database

npm run db:migrate down all

About

This is naive implementation of the Active Record pattern in JavaScript with SQLite


Languages

Language:JavaScript 100.0%