Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (async () => {
- const http = await import("http");
- const open = (await import("open")).default;
- const url = "http://localhost:3000";
- const interval = setInterval(() => {
- http.get(url, () => {
- open(url).then(() => {
- clearInterval(interval);
- });
- })
- .on("error", () => {
- console.log("Web server is not ready yet");
- });
- }, 1000);
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement