Well This is documentation of my WebServer code.
-=-=-=--=- Purpose -=-=-=--=-
This node.js webserver is made to run multiple diffrend codes at same time using Node.js Child_process, ONLY WORKS ON LOCAL NETWORKS
-=-=-=--=- Why? -=-=-=--=-
Wanted to learn JavaScript, html, Css and Node.js soo i thought this could be fun project + I personaly ganna use it for discord bots and multiple simple Node.js webservers
-=-=-=--=- Capabilities -=-=-=--=-
It can run on basically anything that has Node.js + npm Tested os (Windows 11, Ubuntu 23.10 server)
It should run any files using interpreter(aka "python /index.py", "node /index.js"...)
Can get info about Os and Hardware(CPU not 100% acurate)
Can create button links for remembering ip and ports easier
-=-=-=-=- How to use -=-=-=-=-
how to get to webpage
- go to http://localhost:6900, change Localhost part for ip of device that host this server
Add New Program Code
- Go to AddNewCode tab
- select .zip file format
- EXEname must match the name of ur executable
- select other options
- refresh page
Delete Program Code
- find code that wana delete
- press delete
-=-=-=-=- Q&A -=-=-=-=-
Q: default port ?
A: Default port = 6900
Q: How to add custom launch option
A: go to ./views/CC.ejs find 93 line (there is a comment "IF U WANT TO ADD MORE INTERPRETERS...") above "" add "!NAME!" change !inside shit! to ur chosing for example python.
Q: Why there is Ip undefined and there is no program console output
A: go to /routes/api.js go to line 33 find commented console.log, uncomment it, restart server, when somebody tries to load page, on server console should be array. go back to api.js chance line 40 accordingly
Q: Will u update this
A: Only if i personally ganna need it
Q: Why is the code bad
A: as i stated this is my project for learning JavaScript and soo on, soo yeah some parts are trash.
Q: Why English bad
A: I'm Lithuanian
-=-=-=-=- List of dependacies -=-=-=-=-
npm i cors
npm i multer
npm i adm-zip
npm i [email protected]
npm i ws
npm i node-os-utils
npm i node-disk-info