'use strict';
var path = require('path');
var modules = require('./modules');
var server = require('./server');

// Hapi.Server#route argument
module.exports = [
    // default plugins manager routes
    { method: 'GET', path: '/', handler: {
        file: path.resolve(__dirname + './../app/build/index.html') }
    },
    { method: 'GET', path: '/build.js', handler: {
        file: path.resolve(__dirname + './../app/build/build.js') }
    },

    // API routes
    { method: 'GET', path: '/api/modules/search', handler: modules.search },
    { method: 'PUT', path: '/api/modules/{module}', handler: modules.install },
    { method: 'DELETE', path: '/api/modules/{module}', handler: modules.uninstall },
    { method: 'GET', path: '/api/modules', handler: modules.list },
    { method: 'POST', path: '/api/server/restart', handler: server.restart }
];

@@ -190,32 +190,43 @@
 ger routes%0A    %7B
+ path: '/',
  method: 'GET', 
@@ -224,27 +224,16 @@
 : 'GET',
- path: '/',
  handler
@@ -314,39 +314,24 @@
     %7D,%0A    %7B
- method: 'GET',
  path: '/bui
@@ -337,16 +337,31 @@
 ild.js',
+ method: 'GET',
  handler
@@ -459,39 +459,24 @@
 routes%0A    %7B
- method: 'GET',
  path: '/api
@@ -492,16 +492,31 @@
 search',
+ method: 'GET',
  handler
@@ -544,23 +544,8 @@
    %7B
- method: 'PUT',
  pat
@@ -563,32 +563,47 @@
 dules/%7Bmodule%7D',
+ method: 'PUT',
  handler: module
@@ -624,26 +624,8 @@
    %7B
- method: 'DELETE',
  pat
@@ -651,16 +651,34 @@
 odule%7D',
+ method: 'DELETE',
  handler
@@ -705,31 +705,16 @@
 %7D,%0A    %7B
- method: 'GET',
  path: '
@@ -727,16 +727,31 @@
 odules',
+ method: 'GET',
  handler
@@ -777,24 +777,8 @@
    %7B
- method: 'POST',
  pat
@@ -802,16 +802,32 @@
 estart',
+ method: 'POST',
  handler

put path first on routes