I tried to find a guide on how to get routes for working with variables in a URL For example: games / 124512 and get this identifier for controllers in a variable.
My .js routes now:
'/': { view: 'homepage' }, '/games/': { controllers: 'games', }
My GamesController.js right now:
var GamesController = { sayHello: function (req, res) { res.view('homepage', { user : "sayHello", }); }, sayWelcome: function (req, res) { res.view('homepage', { user : "sayWelcome", }); } }; module.exports = GamesController;
I can write / games / sayHello or / games / sayWelcome, but I would like to be able to write examples / games / 234234 or / games / 234234 / settings
Thanks!:)
source share