15,884,099 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 15818964 (Top 7 by date)
Member 15818964
8-Nov-22 9:29am
View
Thanks for the help! Wouldn't this be a console app, rather than a Windows Service? In this case, how can I guarantee that I will be able to restart node server if it crashes?
Sorry for all the questions, I'm quite new to this, so let me know if you need any clarifying!
Member 15818964
7-Nov-22 13:59pm
View
Thanks for the reply! What if we just want to start running the node server, instead of opening a web browser?
Member 15818964
7-Nov-22 8:57am
View
Yup! Thanks for clarifying! That's exactly what I meant
Member 15818964
7-Nov-22 8:45am
View
Edit: I think what I want to do is, on Windows Service start, open up a browser for a specific local host and display my Node JS app. If the app crashes (server stops, for example, 127.0.0.1/8080 no longer listening), then the service will start the server again, and open up the browser.
Sorry if it was / or still is confusing!
Member 15818964
7-Nov-22 7:59am
View
Hmm, I guess the specification is that if the server ever breaks, the windows service will see that, and start the server again. I don't think I was clear enough on it. Let me know!!
Member 15818964
7-Nov-22 7:57am
View
Yup, it's a bat file with npm run dev as the only line of code
Member 15818964
4-Nov-22 14:19pm
View
I can't seem to run the batch file that invokes the cmd line npm run dev. I tried System.Diagnostics.Process.Start(@"C:/project/client/runclient.bat"); and other solutions (I added above)
But nothing shows up (I know that windows service wouldn't allow access to desktop) but even when I try to get to localhost:8080 it would fail, so I assume that the server wasn't started
Show More