runtime-tmpdisk-server
A temporary alternative to disk access for runtime.js. This is the client component that runs on QEMU.
Note: The server component (runtime-tmpdisk-server) is required to be running on the host.
Second Note: While this was meant for runtime.js, it can also be used as an fs server client.
TODO: Stream encryption.
Install:
npm install runtime-tmpdisk-client
Usage:
'use strict';
var runtime = require('runtimejs');
var fs = require('runtime-tmpdisk-client');
// other stuff
// ...
You can also set the hostname and port:
'use strict';
var runtime = require('runtimejs');
var fs = require('runtime-tmpdisk-client');
fs.hostname = 'www.example.com'; // The default is the host IP in QEMU (192.168.76.2)
fs.port = 8888; // The default is runtime-tmpdisk-server's default port (8088)
// Other stuff
// ...
Functions completed from Node's fs module:
- readFile
- writeFile
- readdir
- unlink
- rmdir
- appendFile
Note the lack of sync functions, this is because http requests are strictly async.