Clone this repository:
git clone https://github.com/traveloka/soya-next.git
cd soya-next/examples/custom-routes
Then, install and run it:
npm install
npm start
Open http://localhost:3000 in your browser.
This example uses express router to enable custom routing.
To use it, create a configuration file at config/default.json
with the following:
{
"routes": {
"/path/:param1/:param2": {
"page": "/path/to/custom-page"
}
}
}