1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-02-15 04:42:05 +00:00
ansible-playable/server/components/errors/index.js

23 lines
382 B
JavaScript
Raw Normal View History

2017-06-07 17:36:44 +00:00
/**
* Error responses
*/
'use strict';
module.exports[404] = function pageNotFound(req, res) {
var viewFilePath = '404';
var statusCode = 404;
var result = {
status: statusCode
};
res.status(result.status);
res.render(viewFilePath, {}, function(err, html) {
if(err) {
return res.status(result.status).json(result);
}
res.send(html);
});
};