如何将DART应用程序作为Windows服务运行? [英] How do you run a DART application as a windows service?

查看:691
本文介绍了如何将DART应用程序作为Windows服务运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究在下一个项目中使用DART语言的可能性。唯一真正让我回到这一点的是,我无法找到一种方法来运行DART应用程序作为Windows服务。我在Google上执行搜索,并阅读了DART网站上的大部分文档。我发现的大部分信息与在DART中创建服务器有关,但与Windows服务无关。



有人可以指示路线或详细说明所需的步骤?



谢谢,
Jon

解决方案使用Dart作为Windows服务作为任何其他可执行文件的区别;你只需要使用正确的参数调用dart.exe。



但是,Windows不支持将任意exes作为Windows服务运行,因为它们需要一些元数据/引导。我对 NSSM - 非吸烟服务经理有丰富的经验。在评论中,建议SC.exe;但我无法让它运行在最新版本的Windows Server:(


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

解决方案

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 :(

这篇关于如何将DART应用程序作为Windows服务运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆