I want to run nodejs http-server which serves a static file as a windows service which autostarts on boot. How do we keep this server running in background?
use NSSM.
You usually need a windows service to be destined for being a server, this is a service manager that works as a service and lets you make simple apps into windows services.
Related
I need to run a node.js server application as a self-contained executable which should be a Windows service. There are several libraries creating either a self-contained executable or which implement a Windows service layer in node.js but do not create a self-contained executable which is a Windows service itself.
Requirements are:
node.js server app should be deployed as Windows service (self-contained, win-exe, no node installation on target machine)
Windows service should be able to use parameters for node.js server app (e.g. a TCP port number or node_env)
it would be great, if some files could be stored beside the service which are used within node.js server app (e.g. SSL certificates)
Does anyone know an open source tool, library or sth. else which does fulfill these requirements and which is maintained well (still supported / developed, no critical old open issues etc.)?
I am developing a small project which contains few applications:
A node.js rest API
A node.js app that use socket.io.
A static app that server html js file to the client.
I am also using a MongoDb.
In few weeks, I'll have to deploy this app in production and I have some requirements that the app should be installed on windows and Linux server (Don't really know if it really matters).
I had a look at some tooling :
StrongLoop Process Manager
PM2
Forever
But cannot really find out if these tools are up to date or if there are better alternative in 2016 ?
Here are what seem to be the recommended ways that I've found:
Windows: iis-node (and this vid is helpful to get that going). Also note you'll need IIS 8x to support websockets.
Linux: PM2 to manage the process, and nginx for proxy server. This article has helpful step-by-step for Ubuntu.
I am new to Azure. I am following this tutorial in setting up my .Net server for azure and ios client.
http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-ios-get-started/
I am testing my ios client on simulator. Can I run my .NET server on my location machine with put publish it to azure? If yes, how can I figure my client to talks to this location machine?
And in the tutorial, it creates a Database Table. If I run it locally, do I need to setup my location DB server?
Not on a mac (which you need for iOS development). With the .NET backend you can run the service locally on a Windows machine, but it will be running off of localhost.
For iOS development, you have two choices. If you use the JavaScript / node.js backend, where all of your development can be done in the Mac (you can configure the service via Git locally or directly in the portal). If you use the .NET backend (the link you mentioned), then you need the Mac for the client-side development, and a PC (or Windows running in the Mac on an emulator such as parallels) to develop the server (you need Visual Studio for that).
And regarding your question about the table, when you run it locally, it will use Entity Framework Code First (by default), so you don't need to create the table in your (local) database - it will create it automatically for you.
I´m developing a Windows 8 App, and it needs a desktop app running on background to work properly.
So i have two questions:
1.- The OS is a Windows 8.1 Industry Embedded. I need to autorun the desktop app and my Windows 8 app at startup.
Here explains how to do so with a Windows 8 App, but not with a desktop app, so i´m using this other solution to add the application to the Windows Startup folder, but i´m not sure if this is the best way.
2.- Then, when my app starts, i should check if the other app is running or not to work in one way or another. How can i check that? I´m developing with HTML and Javascript.
Thanks!
Yes that is the 'proper' solution to starting a desktop app on startup. Otherwise you can look at creating a windows service that manages the app lifecycle.
By design, winRT apps are not supposed to talk to desktop applications, but if you are sideloading the winRT app (i.e., not through the Windows Store), you could run a local server with your desktop app, and then enable local loopback with localhost in your winRT app and communicate that way.
Running a node.js server in Windows. I need the server to auto launch on startup-boot, followed by launching a standalone application. can anyone tell me the best way of accomplishing this?
You'll want to run node as a Windows Service. Services start right after boot, before login.
As far as launching the standalone app, the answer depends on what it is. If it's a GUI app, you'll need to configure Windows to automatically log in, then you can just put it in the Startup folder. If it doesn't have a GUI, you can just use child_process to spawn the app from node.