简体   繁体   中英

Is it possible to deploy HTML, CSS and JavaScript (as client side) along with Node.js files( server side) to Heroku?

I want to deploy an app containing HTML, CSS and JavaScript files for UI part along with Node.js server files to Heroku. Is this possible?

All I want to do is make AJAX request from client side to Node server which will respond some data and I will update the UI with that data.

How to achieve this for deploying both client and server side files to heroku?

Yes.

This question is can effectively be rephrased as "Can Heroku be used as a (static) webserver?". Following the tutorial provided by Heroku will get you pretty far. For what your use case sounds like I believe you would just want to remove some lines of code so you would only be doing static file serving and listening on the port, then replace the contents of the public folder with your HTML, CSS, and JS files.

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