You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 7, 2018. It is now read-only.
'use strict';constminty=require('minty');consthttp=require('http');consttestDoc=`<html> <head> <title>Minty Node Example</title> <script type="text/javascript"> var alertContent = 'If this alert shows, you have done a great job!'; function showAlert(string) { alert(string); } </script> </head> <body onload="showAlert(alertContent);"> <h1>Minty Node Example</h1> <p> <a onclick="showAlert(alertContent)">Click to show alert again</a>! </p> </body></html>`;consttestHeader={'Content-Type': 'text/plain'}functionsendContent(response,content,header){response.writeHead(200,header);response.end(content);}varsendMinty=minty.wrap(sendContent);http.createServer((req,res)=>{sendMinty(res,testDoc,testHeader);}).listen(3000);