Skip to content

Cannot GET / #85

Description

@dorothyDorothy

This is my Gruntfile:

`var path = require('path');
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

// grunt-express will serve the files from the folders listed in `bases`
// on specified `port` and `hostname`
express: {
  scoop: {
    options: {
      port: 9000,
      debug: true,
      hostname: "dev.scoopbmx",
      bases: [path.resolve(__dirname, '/Scoop_BMX/htdocs')], 
      livereload: true,
      showStack: true
    }
  }
},

// grunt-open will open your browser at the project's URL
open: {
  scoop: {
    // Gets the port from the connect configuration
    path: 'http://dev.scoopbmx:<%= express.scoop.options.port%>'
  }
},         

watch: {
  scoop: {
    files: [
      '_source/js/scoop/*.js' , 
      '_source/scss/scoop/*.scss'
    ],
    tasks: [
      'express',
      'open'
    ],
    options: {
      spawn: false,
      livereload: true
    }
  }
}

});

grunt.loadNpmTasks('grunt-express');
grunt.loadNpmTasks('grunt-open');

grunt.registerTask('default', [ 'watch']);

};

When I run this I get this message in the console:

Running "express-server:scoop" (express-server) task
Web server started on port:9000, hostname: dev.scoopbmx [pid: 10642]

It opens my browser at dev.scoopbmx:9000 but the response is

Cannot GET /

I'm running ubuntu 16.04
Can you tell me what I'm doing wrong?
Also, does this support PHP applications/websites?
Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions