php - why I get 405 on POST with gulp connect -
everything working fine, start using gulp connect on post 405, it's seem's server configuration issue, can 1 on please
my gulp file code
var config = {port: 9217,devbaseurl: 'http://localhost', paths: { css:[ 'node_modules/bootstrap/dist/**/*.css', 'src/**/*.css'], dist: 'dist/' } } gulp.task('connect', function() { connect.server({ root: ['dist'], port: config.port, base: config.devbaseurl, livereload: true, headers: { allow: 'get, head, post, options' } }); });
and js file post
$scope.no_login = function(x, y) { var request = $http({ method: "post", url: "log.php", data: { user_name: x, password: y }, headers: { 'content-type': 'application/x-www-form-urlencoded' } });
after bit research found gulp connect runs server on top of nodejs, execute javascript, not php. need find gulp server solution php module , use gulp-connect-php browser-sync work fine.
Comments
Post a Comment