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

142
Views
Template parse issue nodejs

I'm quite new to NodeJS , i trying to get a solution for issue facing on my node project

issue is when hitting many users on site showing one user data to another user screen

seems like issue with template parsing , using nsmarty to render template

app.js

var app = express();
var configure = require('./configure');
//default setters
config = configure.app();
$arr = {
  config : config
}

home.js (route file[controller])

$arr['usercorp'] = results[4][0][0];
 $arr['ses_id'] = req.body.sess_id;
 $arr['us_id'] = req.body.id;

template.loadTemplate(req,res,$arr);

template.js

exports.loadTemplate = function(req,res,arr)
{
res.setHeader('Content-Type', 'text/html; charset=UTF-8');
         nsmarty.clearCache(arr.file); 

         stream = nsmarty.assign(arr.file,arr);

    stream.pipe(res);
}

Let me know if need more details

Thanks in advance

about 4 years ago · Santiago Trujillo
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!