Lab1 and Lab 2
Lab1 and Lab 2
});
server.listen(3000, () => {
});
File system
// Importing the http and fs module
const fs = require("fs")
// Creating server
fs.appendFile("log.txt",log,(err,data) => {
});
});
server.listen((3008), () => {
console.log("Server is Running");
})
This program reads the content of a file and writes a new file with modified content.
if (err) {
return;
if (err) {
} else {
});
});
// Home route
});
// About route
});
// Contact route
});
app.listen(PORT, () => {
});
http.createServer((req, res) {
res.write(req.url);
res.end();
}).listen(3000);
app.use(express.static(path.join(__dirname, 'public')));
});
app.listen(PORT, () => {
});