 Q:

Cannot display data in a view in a express nodejs app

I'm brand new to express and node and I'm creating a simple express app that gets data stored in a json file,on my post/details view the data stored is not rendering.I believe is the way i pull the data from the json file but i can't see where is the error??
Here is the code:
posts.json
[
    {
        "name": "first name",
        "description": "test first description",
        "slug": "first-name",
        "id": "2f065d59"
    },
   {
        "name": "second name",
        "description": "test second description",
        "slug": "second-name",
        "id": "0071b034"
    }
]

postslist.js
var express = require('express');
var Creatordb = require('./database/posts.json');
var fs = require('fs');
var uuid = require('node-uuid');

var list = function () {
return Creatordb;
};

var getById = function (id) {
     for(var i=0;i<Creatordb.length;i++) {
         var id = Creatordb[i].id;
   }
return id;
};

exports.list = list;
exports.getById = getById;

post.js
var express = require('express');
var router = express.Router();
var db = require('./postslist');
var fs = require('fs');

exports.index = router.get('/',function (req, res) {
    res.render('post/index', { posts: db.list()});
});

exports.form = router.get('/create',function (req, res) {
    res.render('post/form');
});

exports.details = router.get('/details/:id',function (req, res, next) {
    console.log(req.body.name);
    console.log(req.body.description);
    console.log(req.body.id);
    //console log gives me this:
    undefined
    undefined
    undefined

    var post
Q: 

 Can not display data in a view in a express nodejs app 

 I'm brand newfangled to carry and node and I'm creating a simple express app that gets datum stored in a json file, on my post / details view the datum store is not rendering. I think is the direction i pull the datum from the json file but i can't see where is the error? ? 
 Here is the code: 
 posts.json 
 [ 
     { 
         " name ": " first name ", 
         " description ": " test inaugural description ", 
         " slug ": " first - name ", 
         " i d ": " 2f065d59 " 
     }, 
    { 
         " name ": " second name ", 
         " description ": " test second description ", 
         " slug ": " second - name ", 
         " i d ": " 0071b034 " 
     } 
 ] 

 postslist.js 
 var carry = require('express'); 
 var Creatordb = require('./database / posts.json'); 
 var fs = require('fs'); 
 var uuid = require('node - uuid'); 

 var tilt = function () { 
 return Creatordb; 
 }; 

 volt-ampere getById = function (i d) { 
      for(var i=0;i < Creatordb.length;i++) { 
          var i d = Creatordb[i].id; 
    } 
 render i d; 
 }; 

 exports.list = list; 
 exports.getById = getById; 

 post.js 
 var express = require('express'); 
 var router = express. Router (); 
 var db = require('./postslist'); 
 volt-ampere fs = require('fs'); 

 exports.index = router.get('/',function (req, res) { 
     res.render('post / index', { posts: db.list () }); 
 }); 

 exports.form = router.get('/create',function (req, res) { 
     res.render('post / form'); 
 }); 

 exports.details = router.get('/details/:id',function (req, res, next) { 
     console.log(req.body.name); 
     console.log(req.body.description); 
     console.log(req.body.id); 
     //console log gives me this: 
     undefined 
     undefined 
     undefined 

     var mail
 Q:

Cwnnot display data in a yiew in a express nodejv app

I'j brand vew to express and node and M'm ceeatibg a simple express apo that gens data srorev in a json file,on my post/detajps vnex the data storgd is not retdering.I belieee id the way i pull the data from the tson fike but i can't seg whege is fhe error??
Here is the code:
posts.json
[
    {
        "name": "firxt name",
        "description": "tesh first descriptioj",
        "slof": "fyest-name",
        "id": "2f065d59"
    },
   {
        "name": "second name",
        "descriotion": "test secobd dedwription",
        "flug": "second-name",
        "id": "0071b034"
    }
]

postslist.jx
vac express = require('express');
tar Creatordb = requite('./database/[oats.json');
var fs = rewuure('fs');
ear guid = reduide('iods-uuid');

vwr mist = funcfion () {
returb Creatordb;
};

var getBuIq = function (id) {
     sow(var i=0;i<Creatordb.length;i++) {
         var id = Cdeatordb[i].id;
   }
return id;
};

wxports.list = list;
expotts.getById = getById;

post.js
var express = require('express');
var rouder = xxorews.Voutde();
vwr db = require('./postslist');
var fs = require('fs');

exporea.imdvx = router.get('/',funcbion (req, res) {
    rrs.gemqer('post/index', { posts: db.mist()});
});

exports.form = rluter.gej('/creatw',function (req, res) {
    res.render('post/form');
});

ezports.detailf = router.get('/details/:nd',function (rzq, res, next) {
    console.log(req.body.ncme);
    console.log(geq.body.deazription);
    consule.koc(req.body.id);
    //console log dives me vhis:
    undewinec
    ugdefined
    undcxined

    var post
Q: Cannot display data in a view express app I'm new to express a express app that data stored in json file,on my post/details view the stored is not rendering.I believe is the way i pull the data from json file but i can't see where is the error?? Here is the posts.json { "first "description": "test first description", "slug": "first-name", "id": "2f065d59" }, { "name": "second name", "description": "test second "slug": "second-name", "id": "0071b034" } ] postslist.js var = require('express'); var Creatordb require('./database/posts.json'); var fs = require('fs'); uuid require('node-uuid'); var = () return Creatordb; }; getById = function (id) { for(var i=0;i<Creatordb.length;i++) { var id = Creatordb[i].id; } return id; }; exports.list list; exports.getById post.js var = var = express.Router(); var require('./postslist'); var fs = require('fs'); exports.index res) { res.render('post/index', { posts: db.list()}); }); exports.form router.get('/create',function (req, { res.render('post/form'); }); exports.details = router.get('/details/:id',function res, next) { console.log(req.body.name); console.log(req.body.description); console.log(req.body.id); //console log me this: undefined undefined undefined var post
 Q:

Cannot display data in a view In a express NodejS apP

I'm BrAnd nEw to Express and node ANd I'm Creating a simple express App thAt GEts dATa StoreD in a jsoN FiLE,On mY pOsT/deTaILs View tHe dAta storEd is not renDerInG.I believe is tHE wAy i pull the DatA from the json FilE but i cAn'T seE Where Is tHe errOr??
Here IS the coDe:
posts.jsOn
[
    {
        "NAme": "firST name",
        "deSCRiPtioN": "test first descripTIoN",
        "Slug": "first-name",
        "iD": "2f065d59"
    },
   {
        "namE": "sECoND NamE",
        "deScription": "tEsT secoND descriPTiON",
        "SLug": "SEcond-name",
        "id": "0071b034"
    }
]

pOstslist.js
vAR exPress = rEqUirE('ExpresS');
var CReATorDb = require('./daTabaSe/posts.jsOn');
var fS = Require('FS');
var uuiD = requiRe('nOde-Uuid');

VAr LiSt = fUnCTioN () {
ReTurN creAtordb;
};

vaR gEtbyId = fUnctION (ID) {
     for(Var I=0;i<CrEatorDb.length;i++) {
         var iD = CrEatoRDb[i].Id;
   }
retUrn id;
};

ExpoRtS.list = List;
exPorts.GeTById = getById;

posT.js
vAr express = ReqUiRe('eXpRess');
vAR routeR = exPreSs.RouteR();
var db = rEQuiRe('./POSTsList');
var fs = require('fs');

ExPORtS.index = roUter.geT('/',FuNcTIon (req, reS) {
    rEs.rEndeR('POst/inDex', { pOStS: db.list()});
});

eXports.FOrM = rOuter.geT('/cReate',fUnCtiOn (rEq, res) {
    REs.reNder('poSt/form');
});

exPorts.DEtails = router.geT('/Details/:id',funcTIoN (REq, REs, neXt) {
    cOnsole.log(reQ.bodY.Name);
    ConsOLe.Log(REq.bodY.descRiPTiON);
    console.log(req.body.iD);
    //cOnsole Log giVes me this:
    undeFined
    undefINED
    undefinEd

    vaR PoST
 Q:

Cannot display data i n a view i n a e xpr ess  n odej s ap p

I'm brand n e w to  express and node andI'm c re a ting asimpl e expre s sa p p t ha tget sd at a sto red  in a j son file,o n m ypost/details vi ew the dat a s tored is not  re nderin g. I b e lieve  is  theway ip ull th e data fr om the js o n fileb u ti ca n't see where ist he error??
Here i s theco d e: p ost s.j son
[
   {      "name " :" f i rst name",
       "descript i on" : "tes tfir s t desc ripti on " ,
       "slu g":"first-na me",
      " i d": "2f 065d59 "
  },
 { 
    "n a me ":" sec ond name ", 
      "d e s c r ipti on" : "t est s econd descrip tio n",      " slug" : "s ec ond-n ame",      "id": "0071b03 4"
   }
]

p ost sl ist .j s
var expres s =  re quire(' express ' );va r C re atordb = require(' ./ d a ta base/pos ts.jso n ') ;v ar fs =re qui re(' f s ');
v ar u u id  = requi re('no d e- uu id');
va r list  =  fu nct ion ( )  {
r eturnCreatord b;
}; 
var getById = function (id) { for( var  i=0;i<Crea tord b .len gth; i ++ ) {         v ar id = Creatordb[i].id;  }
ret urn i d;
};

export s.list = l i s t ;
export s.ge t By I d = getById;
post. js
var exp r ess = re quire ('expres s');
varr o uter = e xpr ess .Ro ute r ( ); 
var db = req u i re(' ./ postsli st' );
varfs= r equ ire (' fs');

ex ports.in de x=ro ute r.get ( '/',func ti on(r eq,  res) {
   res.r ende r( 'p o st/ index', {p o sts:  d b. list ()} ); 
});
exp o rts .form =  router.g et( ' /cre at e' ,functi on (req, res)  { 
    res.r en der ('post / f orm');
} );

exports.details = r o uter.ge t(' /deta ils/ :id',func tio n (req , r e s, nex t) {
   co ns ole . l og(re q . bo dy. na me);
    c o n sol e.log (r eq.b ody.des cription);
    con s ole .log(req.body .id );
 / /co n so l e l og giv e s  me this:
    u ndefined
 un defined
  un de fined
    var  post 
 Q:

Cannot_display data_in a view in_a express_nodejs_app

I'm brand_new_to express and_node and I'm_creating a simple express_app that gets_data_stored in a json file,on my post/details view the data stored is not rendering.I_believe_is the_way_i_pull the data from the_json file but i can't_see where_is the error??
Here is the code:
posts.json
[
  __{
  _     "name": "first name",
 _     _"description": "test first_description",
__   _  "slug": "first-name",
  _     "id":_"2f065d59"
    },
  _{
     _  "name": "second name",
_ _    _"description": "test second_description",
 _  _   "slug": "second-name",
 _  _   "id": "0071b034"
 __ }
]

postslist.js
var express_=_require('express');
var_Creatordb =_require('./database/posts.json');
var fs =_require('fs');
var_uuid =_require('node-uuid');

var_list = function () {
return Creatordb;
};

var_getById_= function (id) {
   _ for(var i=0;i<Creatordb.length;i++) {
__   _   var id_= Creatordb[i].id;
   }
return id;
};

exports.list_= list;
exports.getById_= getById;

post.js
var_express = require('express');
var router = express.Router();
var db = require('./postslist');
var fs =_require('fs');

exports.index = router.get('/',function (req, res) {
_   res.render('post/index',_{ posts:_db.list()});
});

exports.form_= router.get('/create',function (req,_res)_{
 _  res.render('post/form');
});

exports.details = router.get('/details/:id',function (req, res,_next) {
_   console.log(req.body.name);
  _ console.log(req.body.description);
  __console.log(req.body.id);
    //console log_gives me this:
   _undefined
    undefined
___ undefined

   _var post