The way to integrate with existing web server


I’m completely new to Hugo. So it could be a stupid question.
I’m running an simple web server with nodejs. AngularJS is working on frontend.
And now I’m trying to integrate with Hugo into the web server.
Of course, Hugo is a standalone server, so i think there might be 2 web servers.
Basically hope the Hugo is a part of pages.
Is there any best practice integrating Hugo with existing web server?

Yes - don’t! :slight_smile:

More helpfully, if you already have a “production” server, you don’t need the Hugo server. Hugo’s strength is in generating static pages so you should do that, let Hugo create your pages.

You can generate the pages directly into a static folder that your Node.JS app uses - very easy if you are using something like ExpressJS.

Alternatively, if you are following best practice for Node.JS microservices, you probably have a “reverse proxy” on the front-end of your Node apps. If this is something like NGINX or Apache, you can simply use that to serve your static pages. This is a much more performant approach and is also likely to be a lot more secure for your Node apps.