简体   繁体   中英

Can Node.js be used across computers with and without it being installed?

So, I'm making a quiz, and I've been wanting to save my answers to a text file. I want to use " Node.js ", and I'm worried about this: They only offer an installer to install Node.js on your computer. Since I'm not working with servers or anything like that, and I'm just a hobbyist, the people I might first give this to may not have Node.js installed on their computer. Please do note that this is for a website, not a program.

Is there any way I can make this work across computers without Node.js installed?

Thanks for any help!

Yes, you can compile an app made with Nodejs to an executable. Running that executable will not need anything preinstalled. There are many options to do that but I personnally like PKG.

https://github.com/vercel/pkg

Firstly, You should look at various server frameworks. Nodejs is not only the one best. Others, like Django of python can be a better choice.

Secondly, Web Application created by any (Till I Know) Framework required to be installed but no big deal. You can install it in school computer, it's not that heavy software. Some Schools may also use firewall to restrict any unknown web sites to lab. So some free hosting site may not work in lab.

A most right choice must be to install nodejs in your school computers. But you must try Heroku, It's definitely the best free hosting site.

Edit at 31july: Solely Packing nodejs project is not always the best choice because sometimes session handler database run in memory and it require another tools to be installed in computer. Like reds-server in case of redis database.

There's an other option you can check. It's 'Docker'.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM