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

Replace gulp-serve with gulp-webserver for proxies #39

Open
stubbies opened this issue Nov 7, 2014 · 9 comments
Open

Replace gulp-serve with gulp-webserver for proxies #39

stubbies opened this issue Nov 7, 2014 · 9 comments

Comments

@stubbies
Copy link

stubbies commented Nov 7, 2014

As far as I know gulp-serve has no option for setting proxies which makes it complicated if your backend uses a different port and you run into CORS issues.
With gulp-webserver you can set proxies, what do you think?

@joakimbeng
Copy link
Member

Sorry for the slow response...

It sounds good to me! I haven't tried gulp-webserver myself but I'm willing to accept a PR which replaces gulp-serve :)

@reflexdemon
Copy link

What about using gulp-connect to enable proxies? I have tried in my personal project with proxies.

https://github.com/reflexdemon/ng-gulp/blob/master/gulpfile.js#L24-L30
and
https://github.com/reflexdemon/ng-gulp/blob/master/gulpfile.js#L186-L200

I think I will open a PR for this with gulp-connect as soon as I find time.

@stubbies
Copy link
Author

stubbies commented Feb 8, 2015

@reflexdemon does it uses preflight request OPTIONS?

@reflexdemon
Copy link

Yes.
We can do that with headers I believe. Please checkout these lines to set headers.
https://github.com/reflexdemon/ng-gulp/blob/master/gulpfile.js#L27-L29

@reflexdemon
Copy link

@Errvald #44 has been opened for this. This the first time I am working on slush and JS. Please take liberty to test and let me know if out find any issues. I am coming from pure JAVA background and this is just my first try on the JS side of the world.

@stubbies
Copy link
Author

stubbies commented Feb 9, 2015

@reflexdemon livereload seems to be broken for me.

@reflexdemon
Copy link

My middleware server had issues when livereload was restarting. So I had disabled it with proxies. let me see, if I get a hack to fix this and keep you posted.

@reflexdemon
Copy link

@Errvald I got the livereload working on my project and will make the needed changes on the template and push it in couple of days.

Meanwhile here is a sample of working livereload.
https://github.com/reflexdemon/ng-gulp/blob/master/gulpfile.js

@reflexdemon
Copy link

#44 now has livereload

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

3 participants