Run lite-server as a Windows Service with AlwaysUp

How to Run lite-server as a Windows Service with AlwaysUp

Automatically start lite-server in the background whenever your PC boots. Keep it running 24/7 — without anyone having to log on. Set it and forget it!

lite-server is a Node application that serves a web app and automatically refreshes the browser page when the HTML or JavaScript changes. It's a real time saver when developing single page applications (SPAs).

To set up lite-server to run as a Windows Service with AlwaysUp:

  1. Download and install lite-server, if necessary. Ensure that lite-server runs properly and shows your web app in the browser.

    We followed the online instructions and installed lite-server globally with npm install --global lite-server.

    And since we installed everything in the Administrator account, lite-server was placed in this folder on our machine:

    C:\Users\Administrator\AppData\Roaming\npm

    lite-server installation folder

  2. Download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

  4. Select Application > Add to open the Add Application window:

    Add Application

  5. On the General tab:

    • In the Application field, enter the full path to the script that starts the server, lite-server.cmd. If you installed lite-server in the default (global) location, this is:

      C:\Users\<USER-NAME>\AppData\Roaming\npm\lite-server.cmd
      where <USER-NAME> is the name of the Windows account where you installed lite-server.

    • In the Start in directory field, enter the full path to the folder containing your web files. This is "C:\WWW" on our system.

    • In the Start the application field, choose Automatically, but shortly after the computer boots. With this setting, lite-server will start a couple of minutes after boot — once all the machine's critical services are fully up and running.

    • And in the Name field, enter the name that you will call the application in AlwaysUp. We suggest lite-server but you can specify another name if you like.

    lite-server Windows Service: General Tab

  6. Click over to the Logon tab and enter the user name and password of the account where you installed and run lite-server. Node should run in this account so that it can find the script you installed.

    lite-server Windows Service: Logon Tab

  7. We're done configuring lite-server as a Windows Service so click the Save button to record your settings.

    In a couple of seconds, an application called lite-server (or whatever you called it) will show up in the AlwaysUp window. It is not yet running though and the state will be "Stopped":

    lite-server Windows Service: Installed

  8. To start lite-server from AlwaysUp, choose Application > Start "lite-server".

    In a few seconds, the status will change to "Running" and lite-server will be working in the background:

    lite-server Windows Service: Running

    At this point, please open your browser and confirm that your web page is being served. Everything should be fine, as it was on our machine:

    lite-server Windows Service: Browse to the site

  9. That's it! Next time your computer boots, lite-server will start up immediately, in the background, without anyone needing to log on. Please restart your PC now and test that everything works as expected after Windows springs back to life.

    And please feel free to edit lite-server in AlwaysUp and explore the many other settings that may be appropriate for your environment. For example, capture the Node console output to a file, constrain the application to a specific CPU, and much more.



lite-server not working properly as a Windows Service?

  • Consult the AlwaysUp Troubleshooter — our online tool that can help you resolve the most common problems encountered when running an application as a windows service.

  • From AlwaysUp, select Application > Report Activity > Today to bring up an HTML report detailing the interaction between AlwaysUp and lite-server. The AlwaysUp Event Log Messages page explains the messages that may appear.

  • Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we'll be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 15.1 New!

7.9 MB Installer
Our 12,000+ customers include...
Compatible with Windows 11 Compatible with Windows Server 2022 Compatible with Windows 10
Over 94,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 19+ years!