// import 'isomorphic-fetch'; export default { // Here a couple of examples about how to use the custom routes // 'hello/:name': (context) => { // return context.setTemplate('hello_template', { name: context.params.name }); // }, // 'users/:id': (context) => { // return fetch(`https://jsonplaceholder.typicode.com/users/${context.params.id}`) // .then((response) => response.json()) // .then((json) => { // return context.setTemplate('user_template', { name: json.name }); // }); // }, // 'simple-redirection': (context) => { // return context.redirectTo('https://www.nocoffee.fr', 302); // }, // 'local-redirection': (context) => { // return context.redirectTo('/foo', 302); // }, // 'simple-render': (context) => { // return context.render('success'); // } }