阅读背景:

如何知道node.js表达服务器的时间已经准备就绪

来源:互联网 

Have an application where I want to start a node express server and then start a browser on the same machine automatically as soon as the server is up. How can I query to see if the server is up and ready to go? I really wanted there to be some sort of callback on the .listen call, but doesn't seem to be. I could just wait a longer than I expect amount of time, but this is going on equipment that will be in the field so I either have to wait a ridiculous amount of time to make sure I'm up and running before kicking off the browser or have the user be smart enough to hit refresh if the page doesn't load right. Neither of those are good options for me. . . Have an application where I want to start a nod




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: