404,
this.mime_type_html,
Buffer.from(
- `<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
-<TITLE>404 Not Found</TITLE></HEAD><BODY>
-<H1>404 Not Found</H1>
-The document ${pathname} was not found.
-</BODY></HTML>
+ `<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>404 Not Found</title>
+ </head>
+ <body style="font-family: sans-serif, serif, monospace; font-size: 16px;">
+ <h2>404 Not Found</h2>
+ <p>The document ${pathname} was not found.</p>
+ </body>
+</html>
`
)
)
301,
this.mime_type_html,
Buffer.from(
- `<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
-<TITLE>301 Moved</TITLE></HEAD><BODY>
-<H1>301 Moved</H1>
-The document has moved
-<A HREF="${location}">here</A>.
-</BODY></HTML>
+ `<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>301 Moved Permanetly</title>
+ </head>
+ <body style="font-family: sans-serif, serif, monospace; font-size: 16px;">
+ <h2>301 Moved Permanently</h2>
+ <p>The document has moved <a href="${location}">here</a>.</p>
+ </body>
+</html>
`
)
)
}
-let site_factory_default = async root => new Site(root)
+let site_factory_default = async (server, root) => new Site(server, root)
Server.prototype.respond = async function(request, response, protocol) {
try {
{
- "localhost": {"type": "site", "root": "../businessdataflow.git"},
+ "localhost": {"type": "site", "root": "site"},
"localhost.localdomain": {"type": "redirect", "domain": "localhost"}
}