Hello I am a rubinist and began to master Sails.js. There was a problem with specifying the route pages in the router. No matter how he tried, errors emerge. Tell me, please, how can I correctly specify the pages in the router, for example: about , contact , help** , etc. For example, I created the "about.ejs" page, then generated the "PagesController.js controller for this page, now I need to specify the route of this page in" routes.js ". While the router has the default home page '/': {view: 'homepage'}. And how do I set the route to the "about.ejs" page? I do this: '/ about' {view: 'about'}, like in Ruby on Rails, but nothing works out. Documentation in English, even though I understand English, I may have misunderstood something. Here I have a problem with routes.js. And I really liked Sails, I really want to learn it! Yours faithfully. Yuri.

  • Happened!!! The whole thing was in a missing comma. Code blocks must be separated by a comma. Here is the correct version: ** '/': {view: 'homepage'}, '/ about': {view: 'about'} ** - Yuri Schulte
  • If possible, publish the solution found in response to your question . I am sure it will help many of your colleagues in the future. - Nicolas Chabanovsky

0