Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

176
Views
EJS template engine

I'm doing a node.js project and I've an ejs template file which further uses templates for header and footer.

template.ejs looks like this:

<%- include(header) %>
main html body
<%- include(footer) %>

<script type='text/javascript'>
...
...
...
</script>

when I run the server, the script embedded between the script tags becomes clearly visible. How do I hide this part from the page rendered by the node server.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

AFAIK, you cannot do this in EJS (I may be wrong), so you should include the script as an asset and load it from the HTML.

<script src="path/to/script"></script>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!