Created
July 8, 2018 22:13
-
-
Save jason-dark/d3a6bb90846ed7c350778206781d5a19 to your computer and use it in GitHub Desktop.
This file contains 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
function sendRes(res, status, data) { | |
console.log("✔ Sending response"); | |
res.set({ | |
'content-type': 'application/json', | |
'Access-Control-Allow-Origin': '*' | |
}).status(status) | |
.send(JSON.stringify({ | |
"status": status, | |
"data": data | |
})).end(); | |
} | |
module.exports = sendRes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment