0.0.3 • Published 7 years ago

vizql v0.0.3

Weekly downloads
13
License
MIT
Repository
github
Last release
7 years ago

VizQL

Sequelize model schema visualizer.

Features

  • VizQL reads a Sequelize schema from a database connection and renders a visualization of the schema on an express route chosen by the user.

Installation and Use

Install using NPM.

npm install vizql

Then use it in your Node.js as follows:

const express = require('express');
const app = express();
const vizql = require('vizql');
const Sequelize = require('sequelize');
const sqlite3 = require('sqlite3');
const exampleDB = new Sequelize('mainDB', null, null, {
    dialect: "sqlite",
    storage: ':memory:',
});
// Add Sequalize models where appropriate
const User = exampleDB.define('users', {
  id: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true },
  name: Sequelize.STRING
});

app.get('/vizql', vizql(exampleDb).pageRoute);

app.listen(3000);

module.exports = app;

License

MIT License

0.0.3

7 years ago

0.0.2

7 years ago

0.0.0

7 years ago