Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No 'Access-Control-Allow-Origin' header is present on the requested resource. #46

Open
Bhushan001 opened this issue May 6, 2016 · 0 comments

Comments

@Bhushan001
Copy link

I am using gulp-express in my project to deploy the application
gulp-live-server.js
`

var gulpCore = require('gulp');
var gulpParam = require('gulp-param');
var gulpExpressServer = require('gulp-express');
var gulp = gulpParam(gulpCore, process.argv);
var ipfilter = require('express-ipfilter');

var ips = ['http://localhost:8080/'];

//server will be running on port 3100 if not explicitly specified as below
gulp.task('server', function (port,env, package) {
console.log('IN LIVVEEEEEEEEE SERVERRRRR --->>'+' port passed:' + port+ ' command line args:' + process.argv+ ' package:' +package+' env:' +env );

var expressPort = isNaN(port + '') ? 3200 : port || 3200;
var jsonServerStarter = 'server/json-server-starter.js';

gulpExpressServer.run([jsonServerStarter], { env: { expressPort: expressPort } });

gulpExpressServer.use(ipfilter(ips, {mode: 'allow'}));
   gulp.watch(['db.json'], function (event) {
    console.log('abt to notify for db.json');
            //gulpExpressServer.notify(event);
});

});


gulp.task('default', ['server']);`

any inputs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant