How to Render html in Node js on Android | Node js on Android Using Termux 04

Опубликовано: 06 Октябрь 2024
на канале: Code with Coffee
55
2

In this video we will see how we render our website using nodejs in termux non rooted
_________________________

Source Code Here 👇👇👇👇👇👇😆😆😆

const http = require('http');
const fs = require('fs');
const port = 8080;
http.createServer(function (req, res) {
fs.readFile('/sdcard/Documents/My Portfolio/index.html', function(err, data) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(data);
return res.end();
});
}).listen(port);
console.log(`localhost : ${port}`);
___________________________

Playlist

Bash Script:    • Bash Script  

Notification: https://youtube.com/playlist?list=
PLuCejQtGUOQS4pwMOQTnju5x-CpeBUjoJ

Recycler View:    • Recycler View  

Termux Tutorial:    • Termux Tutorial  

Android Studio Erorr Fix:    • Android Studio Erorr Fix  

AIDE-IDE-for-Android-Java/android studio Apps:    • AIDE-IDE-for-Android-Java/android stu...  

Learn Python For free Hindi/Urdu:    • Learn Python For free Hindi/Urdu  

If there is any problem, let us know in the comment box

Follow My Facebook Page:
  / 132319595615417  


Join My Facebook Group
https://www.facebook.com/groups/94732...