Permalink
Browse files

Merge pull request #12 from dai-yamashita/feature

Japanese readme.md and PostgreSQL store
  • Loading branch information...
2 parents 758dd67 + 823ca71 commit 7db6cd133d66e7cd7966f3787936fec50fd8ee5b @Shogun147 committed Feb 4, 2013
Showing with 538 additions and 1 deletion.
  1. +23 −0 lib/store/pgsql.js
  2. +502 −0 readme_ja.md
  3. +13 −1 template/application/config/development/stores.js
View
@@ -0,0 +1,23 @@
+var Log = App.Log;
+
+var PgSQL = require('pg');
+
+module.exports = function(store, config, callback) {
+ var client = new PgSQL.Client({
+ host: config.host,
+ port: config.port,
+ user: config.user,
+ password: config.password,
+ database: config.database
+ });
+
+ client.connect();
+
+ client.on('error', function(error) {
+ Log.error('PgSQL error:\n' + error);
+ });
+
+ Log.debug('PgSQL['+ store +'] connected');
+
+ callback(store, client);
+}
Oops, something went wrong.

0 comments on commit 7db6cd1

Please sign in to comment.