Open jrock2004 opened 9 years ago
IIRC, @luisrudge got this working with browser-sync together a while back, right?
Got an error message:
gulp.task('aspnet', ['build-client'], aspnet(opts.server.aspnet)); ^ TypeError: undefined is not a function
What is aspnet?
Can you copy your gulp file here?
I just copied your gulp file.
did you run npm install
?
Yes. I installed.
can you put a repro up on github? or at least show me both your packages.json and gulpfile.js files
@luisrudge heres my config:
var gulp = require('gulp');
var browserSync = require('browser-sync');
var proxyMiddleware = require('http-proxy-middleware');
var historyApiFallback = require('connect-history-api-fallback');
var path = require('path');
var dnx = require('gulp-dnx');
gulp.task('start', ['web', 'api']);
gulp.task('web', function(done){
var apiProxy = proxyMiddleware('/api', {
target: options.baseUrl,
ws: true,
changeOrigin: true
});
browserSync({
files: ['wwwroot/index.html'],
server: {
baseDir: ['wwwroot'],
middleware: [ apiProxy, historyApiFallback() ]
}
}, done);
});
var options = {
cwd: path.resolve(path.join(__dirname, '..', '..', 'API')),
baseUrl: 'http://localhost:5000/',
restore: false,
build: false,
run: true
};
gulp.task('api', dnx('web', options));
however, it has an issue stated here: https://github.com/aspnet/KestrelHttpServer/issues/636
I want to be able to start browser-sync after my dnx server starts. Does this plugin support a callback or an identifier in the code to say its started the server?