1

I created in Visual Studio 2015 a simple Visual C# Blank App (Universal Windows) with a XAML GUI to input some data. In this project, I implemented a node.js Webserver with server.js and an index.html to display these data. This whole project will run on a raspberry pi with windows iot. So that a client gets the HTML page. Now my question is how to start the web server in this project. It only works with the command "node server.js" in the console. Can I start the javascript in the program directly?

Thanks!

Florian Schaal
  • 2,586
  • 3
  • 39
  • 59
Ollifred
  • 33
  • 7
  • You could run `node` using [System.Diagnostics.Process](http://stackoverflow.com/questions/1469764/run-command-prompt-commands), but that would rely on the user having Node.js installed (or you bundling a version of it with your app). – Joe Clay Mar 02 '17 at 09:41
  • thanks for your hint! Is there a simple other way to implement my node.js webserver in my uwp-xaml project without creating a second project in my solution? – Ollifred Mar 02 '17 at 09:47
  • @JoeClay. System.Diagnostics.Process does not work. The class Process is missing. Don't know why -.- But this is still a good idea, because the raspberry has node.js, I think. – Ollifred Mar 02 '17 at 14:45
  • Ah, perhaps the Pi version of .NET doesn't include System.Diagnostics... Not sure how you'd do it, then. – Joe Clay Mar 02 '17 at 14:51

0 Answers0