Posts

Showing posts from January, 2026

FSD-1 slip 9:Slip9 Create a Node.js file that writes an HTML form, with a concatenate two string.

  const http = require ( 'http' ); const { parse } = require ( 'querystring' ); const server = http . createServer (( req , res ) => { if ( req . method === 'GET' ) { // 1. Serve the HTML Form res . writeHead ( 200 , { 'Content-Type' : 'text/html' }); res . end ( ` <h2>String Concatenator</h2> <form method="POST"> <input type="text" name="str1" placeholder="First string" required><br><br> <input type="text" name="str2" placeholder="Second string" required><br><br> <button type="submit">Concatenate</button> </form> ` ); } else if ( req . method === 'POST' ) { // 2. Handle the Form Submission let body = '' ; ...

FSD-I slip 2Create a Node.js file that will convert the output "Full Stack!" into reverse string

  //Slip 2: Create a Node.js file that will convert the output "Full Stack!" into reverse string const http = require ( 'http' ); const PORT = 3000 ; const server = http . createServer (( req , res ) => { res . writeHead ( 200 , { 'Content-Type' : 'text/plain' }); const input = "Full Stack!" ; const reversed = input . split ( '' ). reverse (). join ( '' ); // Send the output to the browser res . end ( `Original: ${ input } \n Reversed: ${ reversed } ` ); }); server . listen ( PORT , () => { console . log ( `Server is running at http://localhost: ${ PORT } ` ); });

FSD-I NodeJS(slip14,

Slip14: Create a Simple Web Server using node js. var http=require('http'); http.createServer(function(req,res){ res.writeHead(200,{'Content-Type':'text/html'}); res.write('Hello world!'); res.end(); }).listen(3010,()=>{ console.log('Active port 3010'); }); Slip13 Create a Node.js file that will convert the output "HELLO WORLD!" into lower-case letters. var http= require('http'); http.createServer(function (req, res) { var str = "Hello World"; res.write(str.toLowerCase()); res.end(); }).listen(8089, function () { console.log('port 8089 is started'); });

slip 1:FSD-I

 Create an HTML form for Login and write a JavaScript to validate email ID and Password using Regular Expression.  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < script >         let validation =() => {             let isvalid = true ;             var emailV = document . getElementById ( "email" ). value . trim ();             var password = document . getElementById ( "password" ). value . trim ();             document . getElementById ( "emailError" ). innerText = "" ;             document . getElementById ( "password" ). innerText = "" ;             let regEmail = / ^ [ a-z0-9._- ] +...