//Ruby/CGI服务器
import win.ui;
/*DSG{{*/
var winform = win.form(text="Hello World / PHP_CGI 服务器";right=759;bottom=469)
winform.add()
/*}}*/

var code = /*
require 'cgi'

cgi = CGI.new
puts cgi.header
puts "<html><body>This is a test</body></html>"
*/
string.save("/index.rb",code);

import process.ruby.simpleHttpServer;
var url = process.ruby.simpleHttpServer.startUrl("/index.rb");

import web.form;
var wb = web.form(winform);
 
wb.go(url);
winform.show();

win.loopMessage();