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

ruby on rails - Permission denied @ sys_fail2 - (D:/RoR/projects/grp/public/uploads/ -

c++ - nodejs socket.io closes connection before upgrading to websocket -

java - What is the equivalent of @Value in CDI world? -