To main page | Opera Unite HowTo'suniteness-0.11I'm releasing Uniteness v. 0.11, main major advancement is DEBUG mode: THIS IS PREVIEW RELEASES, POSSIBLY BACKWARDS INCOMPATIBILE Images are workingI've found a way to use Yusef's shareDirectory. Things seem to work stable now. If you have downloaded 0.11 already - re-download it. (Didn't want to release 0.12 just as a fix to that).Auto-magically reloading sources* There is a wrapper for scripts so that they reload automatically in debug mode:index.html <script src="serverside/lib/uniteness-0.11.js"></script> <script> DEBUG = 1; // It's important to define it here LOAD_SCRIPT('serverside/main.js'); </script>This will make 'serverside/main.js' to be reloaded on each request. Errors* Errors are displayed to you, but not to your visitors.Static CSS/JS fix* Static files (css/js) serving is semi-fixed.Have to serve them dynamically, but at least they don't break. (Using opera.io.webserver.shareFile breaks images on 5-6th access, actually when you first time you request it concurrently, i.e. when previous attempt to load same image hasn't finished - hit Reload rapidly enough 2-3 times and image/js/css is permanently broken, this is kind of fixed with dynamic serving, but can't serve images yet). (No change in calling convention): URLs([ '_index', start_page, 'stylesheets', 'static', ]); New thingshttp://...operaunite.com/service/my/humane/url?testfunction start_page(r) { r.URI // contains '/my/humane/url' r.uri('/bar/?foo') // will return '/service/bar/?foo' r.uri('/') // will return '/service/' (main page URL)I know this can be confusing, will think how to fix it. pprint(variable)For complexly nested this can be a way to output contents:function start_page(r) { r.write(pprint(opera)) | Last updated
|