Guest User

Untitled

a guest
Jan 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. var cors = require("cors");
  2.  
  3. cors({ origin: '*' });
  4. cors({ allowHeaders: 'X-PINGOTHER'});
  5. cors({ methods: 'GET,HEAD,PUT,PATCH,POST,DELETE'});
  6.  
  7. exports.endpoint = function(request, response) {
  8. let text = '100,000';
  9. response.writeHead(200, { 'Content-Type': 'text/plain' });
  10. response.end(text);
  11. }
Add Comment
Please, Sign In to add comment