Reputation: 2433
I followed this tutorial on how to use Aurelia/Aurelia CLI with .NET Core.
Changes that I had to make:
1. How can I make the Browser sync work on port:5000 served by .NET Core?
It must be something in the run.js file. I have tried:
let serve = gulp.series(
build,
done => {
browserSync({
open: false,
port: 9000,
logLevel: 'silent',
proxy: {
target: 'localhost:5000'
}
}, function(err, bs) {
let urls = bs.options.get('urls').toJS();
console.log(`Application Available At: ${urls.local}`);
console.log(`BrowserSync Available At: ${urls.ui}`);
done();
});
}
);
..with no success..
2. Does it matter if I develop on port:5000 or port:9000?
3. What's the point in hosting Aurelia in .NET Core? Should I only use .NET Core for WepAPI etc?
Upvotes: 1
Views: 1249
Reputation: 1045
I think you're going about this in a very unorthodox way.
Just keep going with what you have. The standard is to host the .NET Core project on port 5000 and Browser Sync on port 9000. You can't host the .NET Core project and the Browser sync on the same port, and messing with the .NET Core project just to move Browser sync to port 5000 is just a lot of work for no benefit.
You develop an Aurelia application, whatever port you decide to host it on doesn't matter at all :)
I wanted to offer an alternative as most tutorials focus on developing on Node. Also, I personally like the MSFT ecosystem, and when I'm going live with any site, it's in Azure. So for me it makes more sense.
I recommend you use whatever technology that makes you productive and whatever makes sense regards to your choice of production environment.
Upvotes: 2