Is it possible to create desktop applications with node.js? [duplicate]

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).

Answers:

Answer

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.

Answer

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();
    }
});
Answer

you can write a desktop app using Qt with node

see this binding

https://github.com/arturadib/node-qt

Answer

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.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.