Created
May 6, 2022 03:07
-
-
Save gyakkun/d017f7730cd0c9d215f66a02cbb2cb56 to your computer and use it in GitHub Desktop.
sp test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var {spawn} = require("child_process") | |
var newHttpServer = spawn("httpserver") | |
function sleep(){ | |
return new Promise(resolve => setTimeout(resolve,5000)) | |
} | |
var ctr = 0 | |
async function main(){ | |
while(true){ | |
console.log("looping " + ctr++) | |
await sleep() | |
} | |
} | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment