Posts

Sportify application in java script.

Image
Spotify -let Enjoy Your Favrouite Music. Spotify Home about-us Best Of Song audio here let love me alot 05:34 let love me alot 05:34 let love me alot 05:34 let love me alot 05:34 let love me alot 05:34 let love me alot 05:34 let love me alot 05:34 let love me alot ...

Use node module in another file with module.exports

 <script>     //index.js   // const average = require('./mod'); // console.log(average([3,5,1])); console.log('This is a index.js file'); //now get full object.. const mod = require('./mod'); console.log(mod.avg([1,2,3])); </script> <script>   /mod.js console.log('This is a mod module'); function average(arr){     let sum = 0;     arr.forEach(element => {         sum += element;           });     return sum/arr.length; } //send data in object form. module.exports = {     avg :average,     name: "Harry",     repo: "GitHub" }; //y object h or hum ise aise send kar skte hai. // module.exports.name = harry ;   </script>

Home page in the node js .

This is a Home Page . Home About Services Contact This is a Home page

Serving HTML Files using Node Js

const http = require('http'); const fs = require('fs'); const fileContent = fs.readFileSync('tut61.html'); const server = http.createServer((req, res)=>{ res.writeHead(200,{'content-type':"text/html"}); res.end(fileContent); }); server.listen(80,'127.0.0.1',()=>{ console.log('Listening Port is 80'); })

Nodejs file Module.

Nodejs server set up

Design page of Ecommerce website .

Image
Document Home About Contact-us Search Join The Cirket Fan Game Circket Bat Now discount 20 % Grab now Circket Bat Now discount 20 % Grab now Circket Bat Now discount 20 % Grab now Circket Bat Now discount 20 % Grab now Circket Bat Now discount 20 ...