I want to deploy the nodejs files to web server, for the time being, i was run like this node server.js through command prompt. how to run the nodejs always and without command prompt. please suggest.
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- google-drive can't get push notifications
- How to reimport module with ES6 import
- Why is `node.js` dying when called from inside pyt
- How to verify laravel passport api token in node /
相关文章
- node连接远程oracle报错
- How can make folder with Firebase Cloud Functions
- @angular-cli install fails with deprecated request
- node.js modify file data stream?
- How to resolve hostname to an ip address in node j
- Transactionally writing files in Node.js
- Log to node console or debug during webpack build
- Get file created date in node
To deploy node.js app, you pretty much need shell access. You have to run node.js somehow. So, typical web-host does not work, you need rights to run your own process. If you are running host yourself, then you are looking for process manager, for example supervisor or pm2.
There is some node.js hosting services too, some good ones listed here. All hosting providers give you instructions how to deploy node.js on their platform so I'm not going to cover that (some examples: Heroku, Digital Ocean). Especially Digital Ocean have a lot of good tutorials, worth of reading, even if you are using some other hosting.
That being said, are you sure you have Node.js app? Node.js is often used in client-side workflows too, so it's possible your app could be deployed using cPanel. If you are just using node.js to run webpack-dev-server, for example, changes are you have just client-side app and it can be deployed on regular http-server, like Apache. If that's the case, your build process most likely produce
dist
folder which contains html, css and js to upload to our server's document root.