This commit is contained in:
2021-02-24 09:06:18 +08:00
parent 2ef9823b2f
commit f458c472f7
3 changed files with 37 additions and 5 deletions

View File

@@ -6,11 +6,11 @@ function addMapping(router, mapping) {
if (url.startsWith('GET ')) {
var path = url.substring(4);
router.get(path, mapping[url]);
// console.log(`register URL mapping: GET ${path}`);
console.log(`register URL mapping: GET ${path}`);
} else if (url.startsWith('POST ')) {
var path = url.substring(5);
router.post(path, mapping[url]);
// console.log(`register URL mapping: POST ${path}`);
console.log(`register URL mapping: POST ${path}`);
} else {
console.log(`invalid URL: ${url}`);
}