prostgles-client

Reactive client for Postgres

Usage no npm install needed!

<script type="module">
  import prostglesClient from 'https://cdn.skypack.dev/prostgles-client';
</script>

README

prostgles-client

Isomorphic TypeScript client for PostgreSQL

GitHub license npm version Dependency Status Known Vulnerabilities tests

Installation

Module

$ npm install prostgles-client socket.io-client

CDN

<head>
    <script src="https://unpkg.com/socket.io-client@3.0.3/dist/socket.io.min.js" type="text/javascript"></script>
    <script src="https://unpkg.com/prostgles-client@latest/dist/index.js" type="text/javascript"></script>	
</head>

Usage

prostgles({
    socket: io(), 
    onReady: async (db) => {
        const latest_posts = await db.posts.find({ }, { orderBy: { created: -1 } });
    }
});

Examples

License

MIT