If a request hit to my socket at '/' route this function gets executed is it posiible to execute this code async?

exports.check= function(fn){

process.nextTick(function(){
while (true) {
    setTimeout(function(){iconsole.log('what');fn(1)},15000)
    console.log('ok')
}
})

}

var express = require('express')
, http = require('http')
, path = require('path');

var app = express();
tt=require('./tt')
app.get('/test',function(req,res){
 tt.check(function(err,data){
    console.log(err)
    console.log(data)
    if(err){res.status(500).json({error : err})}
    else{res.send(data)}
})
})

and check function is defined in my question.