- Update pg_hba.conf (most likely in /etc/postgresql/9.4/main) with -
host all all 0.0.0.0/0 trust
- Update postgresql.conf to use
listen_addresses = '*'
- Be sure to
sudo service postgresql restart
Configure Vagrant
package main | |
import ( | |
"net/http" | |
"database/sql" | |
"fmt" | |
"log" | |
"os" | |
) |
'use strict'; | |
/** | |
* | |
* An Angular Jasmine testing utility | |
* | |
* @copyright 2013 Chris Sattinger | |
* MIT License | |
* | |
* automatically injects these services: | |
* '$httpBackend', '$rootScope', '$controller', '$compile' |
require 'pg' | |
class PG::Connection | |
def self.wrap_send_method(meth) | |
alias_method "#{meth}_wo_wrap", meth | |
define_method(meth) do |*args| | |
begin | |
send("#{meth}_wo_wrap", *args) | |
rescue PG::UnableToSend => e |
# frozen_string_literal: true | |
class SlowCall | |
def self.work | |
@work ||= Concurrent::Promises.future(name: "load #{self.class.name}") do | |
sleep 2 | |
Time.now | |
end | |
end | |
end |