Check out my previous blog to set up the Hapi js server. Now, we’ll add route to our index.js file. server.route({
method: 'GET',
path: '/',
handler: (request, h) => {
return 'Hello World!';
}
}); Here, the method can be GET, POST, PUT, DELETE, as per the requirement of the…