How to realize multithreading in Mini Program koa

I write child_process in app.js
in the koa background directory brought by Mini Program and then fork the time.js of the sibling directory

In

time js is
function loop () {
console.log (1)
}
setInterval (loop,1000)

the problem came when I uploaded it to the server through Wechat"s development tool, and he swallowed my timerjs directly.
I found that require exists in all the other files I can find. There will be no files without require.

so how to write multithreaded child processfork with module exports

Apr.17,2021
Menu