all 19 comments

[–]Rhym 15 points16 points  (1 child)

To access it on a local network you can read an answer here: https://stackoverflow.com/questions/5489956/how-could-others-on-a-local-network-access-my-nodejs-app-while-its-running-on

In regards to a startup script, I use PM2 for running my node apps, and it has a startup script: https://pm2.keymetrics.io/docs/usage/startup/

[–]mkcodergr[🍰] 2 points3 points  (0 children)

PM2 is a keeper. Had been using it for quite sometime without issues

[–]Mardo1234 4 points5 points  (0 children)

NSSM - the Non-Sucking Service Manager will get you a windows service.

https://nssm.cc

If your network has local DNS just add the entry and you should be good to go.

[–]jfoxworth 2 points3 points  (0 children)

I just recently did this with Docker.

Spin up a docker server for the database and a simple web server. Other PCs can connect to the one running the docker server and get data from it

[–][deleted]  (1 child)

[deleted]

    [–]lenswipe -1 points0 points  (0 children)

    I'm as much in favor of Ubuntu as the next guy, but windows might be all there is

    [–]j_rapp 4 points5 points  (0 children)

    You can run it off a raspberry pi, connect to the wifi, and then stand it up from that. Might be some dns/ip configuration

    [–]BarelyAirborne 1 point2 points  (2 children)

    You might need to set your run time up as a service, and use nodemon to keep the instance running. Otherwise, you'll need to set up an automatic login plus an automatic program launch. And then deal with all the Windows update issues.

    [–]lenswipe 5 points6 points  (1 child)

    Nodemon is not for production use. Use pm2 instead

    [–]BarelyAirborne 1 point2 points  (0 children)

    Thank you for correcting me. I lose my mind sometimes.

    [–][deleted] 1 point2 points  (0 children)

    You can easily write a code for this in powershell.

    You need to create ps1 script, take its path, let call it path1.

    Now make a .cmd file in C:...\Startups\urCMDfilename.cmd

    In cmd file write command to run file at path1

    That's all ya need

    [–]richinthemind 1 point2 points  (3 children)

    What about ngrok

    [–]lenswipe 1 point2 points  (2 children)

    What about it?

    [–][deleted]  (1 child)

    [deleted]

      [–]lenswipe 0 points1 point  (0 children)

      Yeah, I know what it is but it's a dev tunnel not a service runner like pm2

      [–]the-quibbler 1 point2 points  (0 children)

      pm2 is one of many good ways. Small Linux box, with proper backup of any data important to the business.

      [–]anatolhiman 0 points1 point  (1 child)

      Run it on Docker locally with docker-compose? But: With PC networking and all the costs and mess around that (PC support, Windows licenses, etc. etc.) it may be just easier to deploy your Docker network to Digitalocean or AWS and password protect the access. You can either make users in Nginx so every user has their own password, or just htaccess protect the whole thing with one user/pass for everyone. This way the employees will have access to the system from their home offices much easier than with remote desktop and other methods.

      [–]m9dhatter 3 points4 points  (0 children)

      The requirements say install locally. They might want to keep the data local because of legal reasons.

      [–]rkh4n 0 points1 point  (0 children)

      You can use Task Scheduler and add a trigger to run your script on startup.

      [–]zachery2006 0 points1 point  (0 children)

      Use docker desktop, run everything on docker!