Added nodejs webserver

This commit is contained in:
Eric NGUYEN 2022-08-03 16:37:23 +02:00
parent b07acdb83d
commit 85169f198e
2 changed files with 305 additions and 2 deletions

View file

@ -10,9 +10,9 @@ serve({
let json;
if (url.pathname === '/GetSVGLayoutConfiguration') {
json = JSON.stringify(GetSVGLayoutConfiguration());
} else if (url.pathname === 'FillHoleWithChassis') {
} else if (url.pathname === '/FillHoleWithChassis') {
json = JSON.stringify(FillHoleWithChassis(request));
} else if (url.pathname === 'SplitRemplissage') {
} else if (url.pathname === '/SplitRemplissage') {
json = JSON.stringify(SplitRemplissage(request));
} else {
// TODO: Return 404 rather than this