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

Javascriptnode.jsWindow

Javascript Problem Overview


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

Javascript Solutions


Solution 1 - Javascript

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.

Solution 2 - Javascript

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.

Solution 3 - Javascript

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

Solution 4 - Javascript

you can write a desktop app using Qt with node

see this binding

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

Solution 5 - Javascript

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionitamarbView Question on Stackoverflow
Solution 1 - JavascriptthejhView Answer on Stackoverflow
Solution 2 - Javascriptbenedict_wView Answer on Stackoverflow
Solution 3 - JavascriptChris SaintyView Answer on Stackoverflow
Solution 4 - JavascriptMhdSyrwanView Answer on Stackoverflow
Solution 5 - JavascriptalessioalexView Answer on Stackoverflow