Skip to content

Instantly share code, notes, and snippets.

@petersirka
Created November 29, 2022 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petersirka/b2c838747155dc98465d3342064e0f0c to your computer and use it in GitHub Desktop.
Save petersirka/b2c838747155dc98465d3342064e0f0c to your computer and use it in GitHub Desktop.
require('total4');
CORS();
ROUTE('POST /*', function() {
var self = this;
switch (self.url) {
case '/api/v1/ott-dummy/heartbeat/':
case '/api/v1/ott-dummy/view/':
self.plain('OK');
break;
}
});
ROUTE('#404', function() {
var self = this;
self.status = 405;
self.plain(self.req.method + ' is not allowed for the request.');
});
HTTP('release');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment