/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/nodesul@4.0.1/app.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var express=require("express"),https=require("https"),app=express(),bodyParser=require("body-parser");app.use("/jscript",express.static(__dirname+"/jscript")),app.use(bodyParser.urlencoded({extended:!0})),app.use(bodyParser.json()),app.get("/",(function(e,o){console.log("request received from: "+e.ip),console.log("request body: "+e.body),o.sendFile(__dirname+"/windows/index.html")})),app.post("/Greeting",(function(e,o){var r={rsp:200,msg:"Feliz Cumpleanos "+e.body.name+" !!!"},n=JSON.stringify(r);console.log(n),o.send(n)})),app.post("/Convert",(function(e,o){var r=e.body.from,n=e.body.to,s=e.body.amount,t={host:"free.currencyconverterapi.com",port:443,path:"/api/v5/convert?q="+r+"_"+n+"&compact=ultra",method:"GET"},p=https.request(t,(function(e){console.log(e),e.on("data",(function(e){var t=JSON.parse(e)[r+"_"+n],p={rsp:200,from:r,to:n,amount:s,convertedAmount:parseFloat(s)*parseFloat(t)},a=JSON.stringify(p);console.log(a),o.send(a)}))}));p.end(),p.on("error",(function(e){console.log("Error: ",e)}))}));var PORT=80;app.listen(PORT),console.log("running on port "+PORT);
//# sourceMappingURL=/sm/154cc48e37afeac0b778f39b15472430e6fc8360f957da7eb44af91a78b56f3d.map