seven21
seven21

Reputation: 124

NodeJS desktop app without server?

I am trying to learn nodejs, I was overwhelmed by the amount of modules and I cannot put myself to choosing which way I will go.

But first, there are still some things I'm still unsure of that I think will greatly affect how I will proceed with my project. All tutorials and samples I've read so far makes use of a server-client architecture. Using the create server method and listening to a specific port. What I intend to build is a simple desktop application with database (sqlite3).

  1. Do I still need to create a server and open a port if it's a desktop app?
  2. If it's possible without server, what modules can process and serve pages stored locally?

Those are the things holding me right now. But please feel free to suggest other things that might be related to my intended project. BTW, I'm also looking at express and angular.

TIA. Looking forward to learning nodejs

Upvotes: 1

Views: 4119

Answers (1)

Andi N. Dirgantara
Andi N. Dirgantara

Reputation: 2051

Yes, Node.js is able to create desktop apps.

  1. It's not necessary to create an open ports. Depends on your application's needs.
  2. I usually use Node Webkit. It's just like desktop browser, without toolbar (you can also add toolbar if you wanted :p). And for local storage, just use it like in browser. Node Webkit use Webkit, just like Google Chrome, so it's very easy to use.

In case you create an desktop application, Express is useless :D it's web server framework. But Angular is still useful, just like you create an UI and UX at common website. Angular can handle page transitions, gives our code's structure, easy to maintain because of it's modules system, etc.

AFAIK one of the best use case desktop apps that use Node Webkit is Game Dev Tycoon.

NodeJS is fun :D

Upvotes: 3

Related Questions