[英]How to use browser sync external url with PHP in android?
I've tried to open my joomla site in the Android browser with browserSync external URL. 我试图使用browserSync外部URL在Android浏览器中打开joomla网站。 I use wamp to run the server on pc.Is there a way to set up PHP and a web server on an Android device ? 我使用wamp在pc上运行服务器。是否可以在Android设备上设置PHP和Web服务器? How can I run joomla or php site on my Android device with browserSync ? 如何使用browserSync在Android设备上运行joomla或php网站?
external url in browser 浏览器中的外部网址
my gulpfile.js: 我的gulpfile.js:
var gulp = require('gulp'),
watch = require('gulp-watch'),
postcss = require('gulp-postcss'),
autoprefixer = require('autoprefixer'),
cssVars = require('postcss-advanced-variables'),
cssImport = require('postcss-import'),
nested = require('postcss-nested'),
browserSync = require('browser-sync').create();
gulp.task('styles', function() {
var processors = [
cssImport,
cssVars,
nested,
autoprefixer({
browsers: ['last 2 versions']
})
];
return gulp.src('./assets/styles/styles.css')
.pipe(postcss(processors))
.pipe(gulp.dest('./temp/styles'));
});
gulp.task('watch', function() {
browserSync.init({
proxy: "localhost/j2shop",
port: 8080,
notify: false,
watchTask: true,
debugInfo: true,
logConnections: true
});
watch('./assets/includes/**/*.php', function() {
browserSync.reload();
});
watch('./assets/styles/**/*.css', function() {
gulp.start('cssInject');
});
});
gulp.task('cssInject', ['styles'], function() {
return gulp.src('./temp/styles/styles.css')
.pipe(browserSync.stream());
});
Just run gulp
. 刚gulp
。 That will start Browsersync running and it will report to you in Terminal what the external url to enter on your device is. 这将启动Browsersync运行,并在终端向您报告要在设备上输入的外部URL。 It will be something like http://10.0.1.12:3000 . 它将类似于http://10.0.1.12:3000 。 Just enter that on your Android and you will see your site. 只要在您的Android上输入密码,您就会看到您的网站。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.