Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Updated #2

wants to merge 1 commit into from

Commits on Aug 4, 2020

  1. Updated

    There was a problem that i faced .I was not able to see data(full name,email,mobile,city)in" view all" field .But still data was present in my database in mongoDB compass.
    I found that i should install package by command "npm install @handlebars/allow-prototype-access" and should add above modification i.e
    1.const Handlebars = require('handlebars')
    2.const {allowInsecurePrototypeAccess} = require('@handlebars/allow-prototype-access')
    and instead 
    3.app.engine('hbs', exphbs({ extname: 'hbs', defaultLayout: 'mainLayout', layoutsDir: __dirname + '/views/layouts/' }));
    use:
    4.app.engine('hbs', exphbs({ extname: 'hbs', handlebars: allowInsecurePrototypeAccess(Handlebars), defaultLayout: 'mainlayout', layoutsDir: __dirname + '/views/layouts/' }));
         will solve the problem and data can be seen in require field on browser...local host whatever u are using
    neeraj-2 authored Aug 4, 2020
    Configuration menu
    Copy the full SHA
    a7bea39 View commit details
    Browse the repository at this point in the history