3

WinRT makes its full API available to Windows 8 & Windows Server 2012 JavaScript apps.

Is it possible for a node.js app running on Windows Server 2012 to get access to this API?

I am asking because not all low level node modules support Windows (e.g. to query metrics) and with WinRT you could access the OS directly.


@Roger Rowland - I'm not sure your information is entirely correct.

MSDN says WinRT can be used in non Store Apps - see "Managed desktop apps and Windows Runtime"

3
  • 1
    No, it's not possible. The underlying OS has to be Windows Runtime, which means Surface ARM or Windows 8 x86/64bit. See here - getwired.com/2012/05/23/… Commented Apr 15, 2013 at 10:30
  • Interesting, especially since MS indicated that Win32 will become obsolete. Commented Apr 15, 2013 at 11:03
  • That is possible. Look at nadavbar's answer below. Commented May 21, 2014 at 8:05

1 Answer 1

2

As mentioned above - WinRT APIs could be called from regular desktop apps. So you can write a native node.js addon which consumes WinRT apis to expose them to javascript.

The Javascript Apps in windows 8 uses a different javascript engine (Microsoft's Chakra) & host than node.js, thus you don't get the "built in" support that apps get.

If you are interested in calling WinRT APIs fron node.js - We'eve just recently open sourced a new project called NodeRT, which automatically generates node.js native addons which exposes the WinRT APIs into node.js (in the method which is described above): https://github.com/NodeRT/NodeRT

Using this, you should be able to call WinRT APIs from inside node.js.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.