Skip to content

Commit

Permalink
npm install grunt-connect-proxy(master)
Browse files Browse the repository at this point in the history
/api以降をport:3000へアクセスするようにした
  • Loading branch information
nqounet committed Jun 14, 2014
1 parent 2faf39c commit 19aba9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,21 @@ module.exports = function (grunt) {
options: {
middleware: function(connect) {
return [
require('grunt-connect-proxy/lib/utils').proxyRequest,
connect.static('.tmp'),
connect().use('/bower_components', connect.static('./bower_components')),
connect.static(config.app)
];
}
}
},
proxies: [{
context: '/api',
host: 'localhost',
port: 3000,
https: false,
changeOrigin: false
}],
test: {
options: {
open: false,
Expand Down Expand Up @@ -381,6 +389,7 @@ module.exports = function (grunt) {
'clean:server',
'concurrent:server',
'autoprefixer',
'configureProxies:server',
'connect:livereload',
'watch'
]);
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"grunt": "^0.4.5",
"grunt-autoprefixer": "^0.7.3",
"grunt-concurrent": "^0.5.0",
"grunt-connect-proxy": "^0.1.10",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-compress": "^0.9.1",
"grunt-contrib-concat": "^0.4.0",
Expand Down

0 comments on commit 19aba9a

Please sign in to comment.