Search Results

Search found 2 results on 1 pages for 'kliao'.

Page 1/1 | 1 

  • VirtualBox Port Fowarding to Connect to PostgreSQL Database

    - by kliao
    I'm trying to connect to a PostgreSQL database hosted on a Win7 guest from a Win7 host. I've configured security in pg_hba.conf host all all 127.0.0.1/32 md5 host all all 10.0.2.15/32 md5 host all all 192.168.1.6/32 md5 and set the listen_addresses setting in postgresql.conf to '*'. I think I've set up port forwarding correctly as I see: Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/win7_vm1/GuestPort, Value: 5432 Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/win7_vm1/HostPort, Value: 5432 Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/win7_vm1/Protocol, Value: TCP when I call getextradata. This is similar to http://serverfault.com/questions/106168/cant-connect-to-postgresql-on-virtualbox-guest but I'm not sure what I'm doing wrong. In the vbox.log file I see: 00:00:01.019 NAT: set redirect TCP host port 5432 = guest port 5432 @ 10.0.2.15 00:00:01.033 NAT: failed to redirect TCP 5432 = 5432 but I'm not sure how to fix that. Any ideas? Thanks.

    Read the article

  • Is it hacky to manually construct JSON and manually handle GET, POST instead of using a proper RESTful API for AJAX functionality?

    - by kliao
    I started building a Django app, but this probably applies to other frameworks as well. In Backbone.js methods that call the server (fetch(), create(), destroy(), etc.), should you be using a proper RESTful API such as one provided by Tastypie or Django-Piston? I've founded it easier and more flexible to just construct the JSON in my Django Views, which are mapped to some URLs that Backbone.js can use. Then again, I'm probably not leveraging Tastypie/Django-Piston functionality to the fullest. I'm not ready to make a full-fledged RESTful API for my app yet. I simply would like to use some of the AJAXy functionality that Backbone.js supports. Pros/Cons of doing this?

    Read the article

1