Reputation: 3360
I have a very simple configuration for grunt-contribu-connect in my Gruntfile.
connect: {
dev: {
base: 'dist'
}
},
The task runs and is kept alive by my watch task, but, whenever I try to open a page from this base directory, I get error output instead of the desired page.
Cannot GET /odds.html
In this image, you can see my project structure. The Gruntfile is at the project base, and the odds.html
file I want to open is in the dist
folder relative to that.
Here, you can see the error along with the URI I'm trying to hit.
I'm sure I'm overlooking something silly, but I cannot see it. Please help! Thanks.
Upvotes: 1
Views: 4281
Reputation: 671
I believe that you need to add 'options' and/or 'keepalive' as follows.
connect: {
dev: {
options: {
base: 'dist',
keepalive: true
}
}
},
I hope this helps you.
Upvotes: 10