N
N
Nikita Kornilov2020-03-12 21:11:54
Node.js
Nikita Kornilov, 2020-03-12 21:11:54

How to bind a backend to a Pug + Gulp project?

Hello! There is a project that is written using the Pug template engine, split into separate files in accordance with BEM, the SASS preprocessor is used and all that. In general, everything seems to be done according to the mind. All this is collected into static .html files using the Gulp assembler.

The question arose - how to add a backend to all this? To be honest, I don't quite understand. I used to change the page extension from .html to .php and just write PHP code right there. And how now correctly to add it? So that you can, for example, request data from other resources, store it in a database, process it in some way, and so on. If there is such an opportunity, I would like to make the server part on NodeJS, since I have already got used to JS in the browser part, but I just want to try it. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question