-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtutorial2.js
30 lines (19 loc) · 846 Bytes
/
tutorial2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// const fs = require('fs')
// var text = fs.readFileSync("yash.txt", "utf-8");
// text = text.replace("Entirely", "Completely");
// console.log("The content of the file mentioned is.....")
// console.log(text);
// fs.writeFileSync("yash.txt", "Mera Nick Name Yashu Hai\n");
// Creating a new File by name mathur.txt.
// fs.appendFileSync('yash.txt', "Main Ek Bohot Badi Software Company Khol Ke Rahunga whicj will worth multi billion dollars")
// const http = require("http");
// const hostname = "127.0.0.1";
// const portname = 4000;
// const server = http.createServer((req, res)=> {
// res.statusCode = 200;
// res.setHeader("Content-Type", "text/plain");
// res.end(text) ;
// })
// server.listen(portname, hostname, () => {
// console.log(`Server running at http://${hostname}:${portname}/`);
// });