diff --git a/s/scripts.tpl.html b/s/scripts.tpl.html new file mode 100644 index 0000000..e69de29 diff --git a/src/main.js b/src/main.js index 01a1d82..6f4c362 100644 --- a/src/main.js +++ b/src/main.js @@ -293,6 +293,11 @@ http.createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/html' }); res.end(tpl(), 'utf-8'); } + else if(filePath == "./scripts") { + var tpl = swig.compile(templates.scripts); + res.writeHead(200, { 'Content-Type': 'text/html' }); + res.end(tpl(), 'utf-8'); + } else if(filePath.match(/^\.\/(b|s|t)\/.*/)) { // file contentType = mimeTypes[extname]; switch(contentType) { @@ -367,7 +372,8 @@ var getTpls = () => { "index": fs.readFileSync("./s/index.tpl.html", "utf-8"), "item": fs.readFileSync("./s/item.tpl.html", "utf-8"), "how": fs.readFileSync("./s/how.tpl.html", "utf-8"), - "contact": fs.readFileSync("./s/contact.tpl.html", "utf-8") + "contact": fs.readFileSync("./s/contact.tpl.html", "utf-8"), + "scripts": fs.readFileSync("./s/scripts.tpl.html", "utf-8") }; }; getTpls();