Giter Site home page Giter Site logo

meteor-postgres's Introduction

PostgreSQL + Meteor

Adds postgres support to Meteor via SQL.Collection, which is similar to Mongo.Collection and provides the same functionality namely livequery, pub/sub, latency compensation and client side cache.

Still I would not recommend using it in production yet as the ORM layer is open for SQL-injections. You can check out this SQL package blueprint for a possible more sophisticated SQL implementation that could support most popular SQL Databases, Models and Migrations.

Improvements

  • Tests
  • Proper support for IDs (including strings)
  • Cleaner code and API
  • Support of underscores in table and column names
  • Many bug fixes including
    • errors on creating existent tables (convenient for server startup)
    • postgres client event leak
    • alasql column bug
  • Working example

Installation

Run the following from your command line.

    meteor add storeness:meteor-postgres

or add this to your package.js

    api.use('storeness:meteor-postgres');

Usage

To get started you might want to take a look at the todo-example code. You can run the code by cloning this repo locally and start it by running MP_POSTGRES=postgres://{username}:{password}@{host}:{port}/{database_name} meteor inside the cloned directory.

Tests

To run the test execute the following from your command line.

MP_POSTGRES=postgres://{YOUR USERNAME ON THE MACHINE}:numtel@localhost:5439/postgres JASMINE_SERVER_UNIT=1 VELOCITY_TEST_PACKAGES=1 meteor --port 4000 test-packages --driver-package velocity:html-reporter storeness:meteor-postgres

and check on localhost:4000

Implementation

We use Node-Postgres on the server and AlaSQL on the client. Also thanks to Meteor-Postgres as this project is based on their initial work, but which gets not longer maintained.

License

Released under the MIT license. See the LICENSE file for more info.

meteor-postgres's People

Contributors

michaelhirn avatar awsp avatar purplecones avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.