bugfix: disable browser-sync tunnel

This commit is contained in:
Clément 2018-11-14 16:33:03 +01:00
parent d870d7506a
commit 8217d9a874
1 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,7 @@
const port = 9000; const port = 9000;
const browsersyncPort = 3000; const browserSyncPort = 3000;
const distPath = 'www'; const distPath = 'www';
// express server // express server
const { join } = require('path'); const { join } = require('path');
const express = require('express'); const express = require('express');
@ -12,6 +13,7 @@ app
rep.sendFile(join(__dirname, distPath, '/index.html')), rep.sendFile(join(__dirname, distPath, '/index.html')),
) )
.listen(port); .listen(port);
// browser sync // browser sync
const bs = require('browser-sync').create(); const bs = require('browser-sync').create();
bs.init({ bs.init({
@ -19,6 +21,6 @@ bs.init({
proxy: `http://localhost:${port}`, proxy: `http://localhost:${port}`,
open: false, open: false,
notify: false, notify: false,
port: browsersyncPort, port: browserSyncPort
tunnel: true, // tunnel: true,
}); });