@pitaj excuse my ignorance, But how would I use this?
I've tried
function testrender(req, res, next) {
const Posts = require('../../src/posts/data.js');
var postid = '60617ae45d48fbb848f496aa';
res.render('test321', { uid: Posts.Posts.getPostData(postid) });
};
But I get error "Cannot read property 'getPostData' of undefined" ?