Skip to content

Handling server-side routes with HapiJS #467

Closed
@danialkhansari

Description

Hi,
I want to handle some of my routes on the server (HapiJS) with some specific configs like this:

server.route({
	method:'GET',
	path:'/store/about/',
	config:{
		auth:{
			strategies:['bearer'],
			mode: 'optional'
		}
	},
	handler: function(req, res){
            console.log('Hello from server, authorized route!');
        }

But I couldn't find an example or documentation that shows where to put server routes in electrode architecture. It seems that most of the examples on universal apps assume same configuration for every route. Could you please tell me where to put these routing configs?
Thanks

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions