browser-sync

How to make BrowserSync work with an nginx proxy server?

蓝咒 提交于 2019-11-27 11:20:44
问题 (If needed, please see my last question for some more background info.) I'm developing an app that uses a decoupled front- and backend: The backend is a Rails app (served on localhost:3000 ) that primarily provides a REST API. The frontend is an AngularJS app, which I'm building with Gulp and serving locally (using BrowserSync) on localhost:3001 . To get the two ends to talk to each other, while honoring the same-origin policy, I configured nginx to act as a proxy between the two, available

Node update a specific package

邮差的信 提交于 2019-11-27 09:16:37
问题 I want to update my Browser-sync without updating all my node packages . How can I achieve this? My current version of Browser-sync does not have the Browser-sync GUI :( ├─┬ browser-sync@1.9.2 │ ├── browser-sync-client@1.0.2 回答1: Most of the time you can just npm update (or yarn upgrade) a module to get the latest non breaking changes (respecting the semver specified in your package.json) (<-- read that last part again). npm update browser-sync ------- yarn upgrade browser-sync Use npm|yarn

Can't change the base folder for lite-server in Angular 2 application

人走茶凉 提交于 2019-11-27 06:46:46
问题 I am going through the 5 minute quickstart of Angular 2. However, my application resides in src/ folder instead of at the root of my repository, and when I run npm start the application is trying to find an index.html file at the root. I read up on lite-server and documentation shows that it uses BrowserSync and I can reconfigure BrowserSync with a bs-config.json in my repository. I did that and this is what my config looks like: { "port": 8123, "server": { "baseDir": "./src" } } According to

Gulp-webapp running BrowserSync and PHP

半腔热情 提交于 2019-11-26 16:18:41
问题 My main goal here is to adapt Yeoman's gulp-webapp development workflow to run PHP. Specifically, I want to be able to use gulp-php-connect with multiple base directories (for the compiled CSS from Sass) and routes (for Bower dependencies), if that's even possible. I'm able to run PHP with Gulp using the gulp-connect-php plugin, like this: gulp.task('connect-php', function() { connectPHP.server({ hostname: '0.0.0.0', bin: '/Applications/MAMP/bin/php/php5.5.3/bin/php', ini: '/Applications/MAMP

Stylesheet not loaded because of MIME-type

筅森魡賤 提交于 2019-11-25 23:43:26
问题 I\'m working on a website that uses gulp to compile and browser sync to keep the browser synchronised with my changes. The gulp task compiles everything properly, but on the website, I\'m unable to see any style, and the console shows this error message: Refused to apply style from \'http://localhost:3000/assets/styles/custom-style.css\' because its MIME type (\'text/html\') is not a supported stylesheet MIME type, and strict MIME checking is enabled. Now, I don\'t really understand why this