diff --git a/index.html b/index.html new file mode 100644 index 0000000..b7100a1 --- /dev/null +++ b/index.html @@ -0,0 +1,17 @@ + + + + + Signup Form + + + + +
+ Enter Username
+ Enter Password
+ +
+ + + \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..69ec0cc --- /dev/null +++ b/index.js @@ -0,0 +1,45 @@ +const http = require('http'); +const url = require('url'); +const hostname="127.0.0.1"; +const port =8080; +const express=require('express'); +const server=http.createServer(function(req,res){ + var q=url.parse(req.url,true).query; + console.log("DATA",q); + res.writeHead(200,{"Content-Type":"text/html"}); + if(q['username']!=''){ + console.log("enter IF"); + res.write(""); + res.write(""); + res.write(""); + res.write("");res.write(""); + res.write(""); + res.write(""); + res.write(""); + + res.write(""); + res.write(""); + } + else{ + console.log("enter else"); + res.write(""); + res.write(""); + res.write("");res.write(""); + res.write(""); + res.write(""); + res.write(""); + res.write(""); + res.write(""); + } + + res.end(); +}); +server.listen(port,hostname,function(){ + console.log("server started on "+hostname+":"+port); +}); diff --git a/readme.txt b/readme.txt deleted file mode 100644 index e69de29..0000000