Skip to content

manueltimita/meteor-pg-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

numtel:pg-server Build Status

Package to run PostgreSQL server inside your Meteor app

Installation

Currently only supports Linux (32 and 64 bit) and Mac OSX (64 bit). Windows support is expected in the near future.

Add this package to your application to embed a PostgreSQL server:

meteor add numtel:pg-server

A settings file must be created with the extension of .pg.json in your application. A file name like myapp.pg.json is valid.

If a datadir setting is not specified, the PostgreSQL data will default to your application's .meteor/postgresdb directory. The directory will be created if it does not exist.

When specifying a datadir setting, the path is relative to your application root.

Optionally, set a boolean value for the output_stderr key to true in order to display full ouput of STDERR from the PostgreSQL server process.

See test.pg.json for an example. Settings are used to build the postgres.conf file. Specifying a port is recommended.

Usage

With the start of you Meteor application, you will notice a new line output to the console:

=> Started PostgreSQL.

The PostgreSQL server is started on the local machine and may be used with the numtel:pg package by using the following connection string:

var CONN_STR = 'postgres://'
  + process.env.USER + ':' // Default user is same as system user
  + 'numtel'               // From defaultpw file in NPM package
  + '@localhost:' + PORT   // Port as specified in .pg.json file (default: 5432)
  + '/postgres';           // Default database

Resources

License

MIT

About

Package to run PostgreSQL server inside your Meteor app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%