HTTPS clone URL
Subversion checkout URL
ypg is a Yaws appmod to view/search postgresql tables
Fetching latest commit…
Cannot retrieve the latest commit at this time
|Failed to load latest commit information.|
ypg.erl - Version 1.0 ============== a modified version of ymnesia.erl to work with postgresql ymnesia.erl is found in the yaws source yaws, an erlang based web server, is found at: http://yaws.hyber.org/ ypg uses ajax to show results of table searches Setup ============== Compile ypg.erl erlc ypg.erl put ypg.beam in a known ebin folder in yaws.conf In yaws.conf add the appmods line for ypg: <server localhost> port = 8080 listen = 127.0.0.1 docroot = /usr/local/var/yaws/www appmods = <web-path, ypg> appmods = <cgi-bin, yaws_appmod_cgi> </server> You would then access ypg by going to: http://host/web-path Requirements ============== 1. jquery 2. postgresql 3. http://code.google.com/p/erlang-psql-driver/ 4. A browser that supports the HTML5 slider widget (tested and working as of June 9, 2010: safari 5.0, chrome 5.0.375.70, opera 10.53) 5. create ypg.hrl with this information filled out properly: % postgres connection info -define(HOST, "hostname"). -define(DB, ""). -define(USERNAME, ""). -define(PASSWORD, ""). % jQuery location in YAWS root www folder, i.e. create static folder in /usr/local/var/yaws/www -define(JQUERY, "/static/jquery-1.4.2.min.js"). % YAWS api location (example below) -include("/usr/local/lib/yaws/include/yaws_api.hrl").