❓Send Status

You can return error codes in specific pages. Like you dont want someone enter to "/test" url, than basicly you can return with a error code like 404. Here is an example

app.status(function (data){
    if(data.code == 404) data.res.text("404 Not Found")
    else if (data.code == 500) data.res.text(data.erorr)
})

Last updated

Was this helpful?