How do you run a DART application as a windows service?

旧街凉风 提交于 2019-12-11 01:30:46

问题


I've been researching the possibility of using the DART language for my next project. The only thing really holding me back at this point is that I'm unable to find a way to run a DART application as a windows service. I have run searches on Google and read through much of the documentation on the DART website. Most of the information I found was related to creating a server in DART but nothing regarding windows services.

Can someone either point me at directions or detail the steps necessary to do so?

Thanks, Jon


回答1:


There's no difference in using Dart for a Windows service as any other executable; you just need to call dart.exe with the correct arguments.

However, Windows doesn't support running arbitrary exes as Windows Services, as they require a little metadata/bootstrapping. I've had good experiences with NSSM - the Non-Sucking Service Manager. In the comments, SC.exe was suggested; but I was unable to get it running on the latest version of Windows Server :(



来源:https://stackoverflow.com/questions/21056419/how-do-you-run-a-dart-application-as-a-windows-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!