Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 44585f62fb | |||
| eda61f9601 | |||
| def8eef2e9 | |||
| 20fe4fde5d | |||
| 23208b3a4e | |||
| cc6d595eac | |||
| 737bcf281e | |||
| cef9f36a0f | |||
| 84e70a4c64 | |||
| fd281d38f5 |
@@ -6,11 +6,11 @@ function addMapping(router, mapping) {
|
|||||||
if (url.startsWith('GET ')) {
|
if (url.startsWith('GET ')) {
|
||||||
var path = url.substring(4);
|
var path = url.substring(4);
|
||||||
router.get(path, mapping[url]);
|
router.get(path, mapping[url]);
|
||||||
console.log(`register URL mapping: GET ${path}`);
|
// console.log(`register URL mapping: GET ${path}`);
|
||||||
} else if (url.startsWith('POST ')) {
|
} else if (url.startsWith('POST ')) {
|
||||||
var path = url.substring(5);
|
var path = url.substring(5);
|
||||||
router.post(path, mapping[url]);
|
router.post(path, mapping[url]);
|
||||||
console.log(`register URL mapping: POST ${path}`);
|
// console.log(`register URL mapping: POST ${path}`);
|
||||||
} else {
|
} else {
|
||||||
console.log(`invalid URL: ${url}`);
|
console.log(`invalid URL: ${url}`);
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,7 @@ function addControllers(router, controllers_dir) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
for (var f of js_files) {
|
for (var f of js_files) {
|
||||||
console.log(`process controller: ${f}...`);
|
// console.log(`process controller: ${f}...`);
|
||||||
let mapping = require(dir + `/${controllers_dir}/` + f);
|
let mapping = require(dir + `/${controllers_dir}/` + f);
|
||||||
addMapping(router, mapping);
|
addMapping(router, mapping);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user