+ 1
How can make web page in termux?
9 Respostas
+ 2
Thank you, sir!🤝
+ 2
Ok. :)
+ 2
install python:
> apt-get install python
go to your web folder root:
> cd www
run python http server module at root of your web folder:
> python -m http.server 8080
this will run a web server to port 8080 (could be what you want) for all your private network.
if you want only accept localhost connections:
> python -m http.server 8080 --bind 127.0.0.1
go to a browser, and type "127.0.0.1:8080" in the address bar... (at least actual firefox mobile doesn't support "localhost")
+ 1
1. install node js,
2. create a directory
3. cd directory
4. npm init //accept all the defaults
5.npm install express
6.create a index.js file
7.place the following code inside index.js in order to start a server that can serve static web pages.
-------------------------
const express = require("express");
const app = express();
const port = 3000;
app.use(express.static("public")) ,
/*app.listen(port, () => {
console.log(`server listening at ${port}`);
});*/
-------------------
8. create a public folder and place your html js and css files there.
9. Start the server by following command:
node index. js
Now go to url,
http://localhost: portNumber/ file.html
To see your web page.
0
Your welcome, no need to call me sir tho! :)
0
How can i do termux as code editor.
0
try:
> nano [filename.ext]
if not installed:
> apt-get install nano
then:
> nano [filename.ext]
0
$ pkg install nano
$ nano file.ext{file.html}
0
Cooler trading Betting website code