node.js - browser sync with ejs, the proxy just loads -


i'm trying mean application work browser sync. i'm using .ejs file template, whenever click open index.ejs file downloads it.

i tried 2 settings in gulpfile, none of them works.

//this downloads ejs file gulp.task('serve', function () {     browsersync.init({         server: {             basedir: [''],             directory: true         }     }); });  //this loads , can't access localhost gulp.task('serve', function () {     browsersync.init({         proxy: 'http://localhost:3000'     }); }); 

there npm package called browser-sync-ejs, documentation non existent , have no idea how use it.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -