Mango-information-systems / twitto_be

twitto_be is a real-time tweets analytics dashboard
https://twitto.be
Other
12 stars 2 forks source link

Browsersync setup #92

Closed PanosSynetos closed 7 years ago

PanosSynetos commented 8 years ago

Setup https://www.browsersync.io

PanosSynetos commented 8 years ago

@mef please do an npm install

When npm start it should open a browser window on port 3000. On my machine, I needed to have to wait to reload for 2 seconds, give it a try without on yours.

CSS are automatically injected, in case of JS the browser reloads.

You can have multiple browsers, resolutions, mobile, tablets listening to the port 3000 and all will be reloaded

mef commented 8 years ago

Feedback:

Suggestion:

Tested with nodemon removed, the reload is much faster in that configuration.

PanosSynetos commented 8 years ago

How did you remove nodemon? I tried with some configuration in order to point to app.js for the server but doesnt work

Right now, BS does not restart the server. Maybe with some gulp configuration we could do it, but still it would be two things. One to restart the server and one for the client (unless im very mistaken)

Did you find anything online?

(no irony in the above message :P )

mef commented 8 years ago

No worry.

How did you remove nodemon?

Replace

"watch:server": "nodemon --ignore public/ app.js",

by

"watch:server": "node app.js",

Oh, I didn't realize that, indeed, sorry.

Maybe with some gulp configuration

No no no let's not involve gulp in here.

Let's leave nodemon in place then.