3.0.0 • Published 3 years ago

pg-auto-write v3.0.0

Weekly downloads
27
License
ISC
Repository
-
Last release
3 years ago

pg-auto-write will auto-generate PostgreSQL code for modelling the database.

Go to https://pg-visualizer.herokuapp.com/ and save a database model schema.

pg-auto-write is intended for use with Sequelize. pg-auto-write returns a database-syncing function that can be used with your 6-digit schema code to set-up your database instance.

The datsabase-syncing function returns a promise.

Example code to initialize application that uses pg-auto-write:

const express = require("express")
const {DBsync} = require('pg-auto-write')
const Sequelize = require('sequelize');

const db = new Sequelize(`postgres://localhost:5432/fake-project`, {
    logging: false,
    });

const app = express();
app.use(express.json());

const init = async() => {
    try {
        await DBsync(db)
        const port = process.env.PORT || 8081;
        app.listen(port, ()=> console.log(`listening on port ${port}`));
    }
    catch(ex){
        console.log(ex);
    }
};

init();
3.0.0

3 years ago

2.5.0

3 years ago

2.4.8

3 years ago

2.4.7

3 years ago

2.4.6

3 years ago

2.4.5

3 years ago

2.4.3

3 years ago

2.4.4

3 years ago

2.4.2

3 years ago

2.4.1

3 years ago

2.4.0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago