Pow modules
From PlainOldWebserver
Writing POW modules
Here's how to create the "hello world" module.
hello.sjs:
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<?sjs
var a = Math.floor(Math.random()*2);
if(a < 1) {
document.writeln("¡Hola, mundo!");
} else {
document.writeln("Hello World!");
}
?>
</body>
</html>
hello.install.html:
<html>
<head>
<title>Hello POW Module</title>
</head>
<body>
<script>
var pow_installer = {
version: "1.0.0",
name: "hello",
location: "http://localhost/modules/hello.zip"
};
</script>
<center>Downloading Pow Module will begin now.</center>
<br/>
If this does not happen, please go directly to <a href="hello.zip">hello.zip</a>.
Once completed please see <a href="http://localhost:6670/modules/hello/hello.sjs">Hello Mundo!</a>.
</body>
</html>
zip hello.zip hello.sjs
Place the hello.install.html file in the same directory as hello.zip.
That's it!
