I've created an application using node.js, and I'm interested to know if it's possible to pack the client side (js, html ,css) and the server side into a standalone application (that doesn't required browser).
https://github.com/rogerwang/node-webkit is a project with the goal of running an instance of the webkit browser engine in the same process as nodejs. It allows you to directly use nodes API in the browser. It currently only works on linux works on Windows, Mac and Linux now.
I am also investigating this.
AppJS is looking very promising as an api for building cross platform desktop apps using HTML5, CSS3 and NodeJS. Unfortunately for me it's probably not well enough developed for my next project.
I have been investigating this very topic since the node-webkit project was announced.
I have a blog post about my early efforts http://csainty.blogspot.com/2012/01/creating-desktop-apps-with-nodejs.html
In the latest code drop you can now specify an application closedown callback, which makes it easy now to instantiate your applicaton and a localhost webserver when the application is started. Then close it all down cleanly when it is closed.
This make it pretty easy to port a web application to the desktop depending on what other server dependencies you might have.
var nwebkit = require('node-webkit'),
http = require('http');
var server = http.createServer(function (req, res) {
// If you need it you can create a local web server
// You can also use express etc if preferred
}).listen(3000, '127.0.0.1');
nwebkit.init({
'url': 'index.html',
'width': 800,
'height': 600,
'onclose': function() {
server.close();
}
});
you can write a desktop app using Qt with node
see this binding
There have been some attempts, but at the moment there isn't a proper library for this:
http://www.readwriteweb.com/hack/2011/04/build-desktop-apps-with-nodejs.php
https://github.com/appcelerator-titans/nodejs-desktop-prototype
© 2022 - 2024 — McMap. All rights reserved.