How to include with node.js ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to include with node.js ?

I try "include ./header.ejs","include('header.ejs')", both didn't work. the page is just loading when i stop it there is no styling,There is no error in console,files in the same directory. Is there somethimg i forgot to install

2nd Sep 2020, 12:11 PM
MOSTA_3D
MOSTA_3D - avatar
2 Answers
2nd Sep 2020, 1:01 PM
EmmanueLZ.
EmmanueLZ. - avatar
+ 1
i tried absolute path rather than relative one and it works as it worked for the root page only
3rd Sep 2020, 6:07 AM
MOSTA_3D
MOSTA_3D - avatar