Quit Browser-sync from terminal - browser-sync

How can you quit browser-sync from running in the terminal without quitting the terminal application itself?
I am new to using terminal-based frameworks and technologies so this is probably very basic, but I haven't found such command in the guides from their website. What I am trying to do is exiting browser-sync session and keep on using the terminal.

Just Press ctrl + c You will asked to press Y / N And if you press Y then the browser sync will stop along with other command line tools.

I am also relatively new command-line and sorts, but I do believe that any local server can be terminated via "ctrl+c". While I am not sure about the general rule, I do know that ctrl+c works to exit browser sync in the terminal.

I assume you are using this guide to install browser-sync? https://www.browsersync.io/#install
People typically use browser-sync in conjunction with local client-server web development (like editing html and css, etc.), so you typically do not run browser-sync by itself.
Follow this video to get a better idea on how to integrate browser-sync into your workflow for web development: https://www.youtube.com/watch?v=heNWfzc7ufQ
That video shows how to start from a basic html file and use browser-sync to constantly watch for changes.

Related

Metro-Bundler doesn't automatically open

I'm new to react native and just started with the installations and set up; when I reach to the expo start or npm start] command, in most videos it shows that a page automatically opens on browser localhost:19002 but for me after several times all I get is
Would be really helpful if someone can direct me on what I should do.
The Expo CLI Web UI( the page which automatically opens on browser localhost:19002) is deprecated and in the new version of expo is no longer available.
Just use terminal UI and tap ? in the terminal to see the available options

how to run sublime text javaScript file in my already installed terminus?

I did succeed installing the terminal emulator (Terminus) in sublime text editor but I am bit confuse on how to even get started running my JavaScript files. I can only run JavaScript file in the browser.
Javascript is designed to run inside a javascript engine which is traditionally available inside of browsers. To run javascript on your local machine from a terminal you need an engine to do so. You should look into node.js which is designed for doing exactly this.

How to set up one-click debugging for an application with multiple processes in WebStorm?

I have an application that requires a bunch of moving parts to run, and I'd like to set things up so WebStorm can launch all of it.
An example of what I need to do:
Open a SSH tunnel to the database, which can be accomplished using a script.
Start the API using a NPM script that runs nodemon
Attach a debugger set to automatically reconnect to nodemon
Run the angular development server for the front-end
Run a HTTP reverse proxy to put all of this into the same URL space - the frontend calls the API using root-relative URLs, and the backend doesn't allow CORS
Debug the app in Chrome
This presented me with a bunch of problems:
I can't express the dependencies with "Before launch" that simply won't fire up, because WebStorm waits for the "before" tasks to finish; obviously these process actually need to run continuously.
Compound configurations can only run all of their component configurations in "Run" mode or in "Debug" mode. You can also only use the mode that all of the components have; so e.g. if you have a script configuration (which cannot be debugged) and an attached debugger (which cannot be run without debugging) you'll end up with a configuration that can't be run at all.
If I use a compound configuration without the tunnel that still means the backend will be run in debug mode which I actually don't want, because I'm attaching to it from another configuration. The frontend server will also be run in debug mode which is also pointless.
nodemon in general seems kind of flaky when run from WebStorm, possibly due to NPM; when I stop the debug it it actually doesn't do anything, and when I kill the process afterwards nodemon says it's "restarting child process" but it does actually end nodemon; except WebStorm doesn't notice this, you have to close the debugger tab yourself.
Has anybody managed to get something like this running without actually having to fire up every step on its own?
No way currently... Using Multirun plugin gives you more flexibility (see https://github.com/rkhmelyuk/multirun/wiki/How-to-run-configurations-with-Multirun), but still you can either run or debug all configurations, there is no way to start one configuration in debugger and run the others.
We have a feature request for such option, please follow IDEA-156398 for updates

How to run ElectronJs without a UI?

As well as a UI, I'd like users to have the option of passing in command line options to my tool and for it to output the response to the command line (eg manually or in cron).
Even without creating a window, the UI gets going (eg taskbar on the mac), and on a linux back-end server with no UI libraries it crashes completely.
Is there a way I can avoid having to ship two apps separately, and also more annoyingly using electron to package up one exe, and something like pkg for the other?
Thanks!
You can use a bundling tool like EncloseJS to wrap your Electron application. This would allow you to write a CLI interface. You would then need to move the code that does the actual work to a shared library that both Electron and your CLI can use. You could then introduce a --headless flag that would simply not start the Electron app, while omitting the flag would start the app as usual.

How to compile Node.JS desktop app?

to gain more experience coding and support good projects, I recently got into open source projects and Github. After looking for a project I would like to work on, I found Soundnode (https://github.com/Soundnode/soundnode-app). The project uses NW.js, Node.js and Angular.js.
The question is very fundamental: How do I run the NW.js desktop app from the given files?
I was able to compile the app once, using the bash command open -n -a nwjs --args "/Users/example/path/app". But how do I compile the changes? After changing the index.html file, which is the start for the application, I have to terminate the NW.js app and start it up again (otherwise nothing will happen) and then it opens again the same, unchanged, original app (I changed some html text to see if would load the changed index.html).
Could anyone give me a quick guide how to work with this? What I want to change and everything else I will try to figure out on my own. Just need somebody to give me a head start :)
Best Regards, bbrinx - eager to learn.
nwjs application works next ways:
direct load web files from FS or web
archive files to zip package.nw
Check nwjs manual and docs: http://docs.nwjs.io/en/latest/ and https://github.com/nwjs/nw.js/wiki
Easiest way to compile your app is to use Web2Exe. It can compile for Win, Mac, Linux.
You can use browser tools for developing/debugging your application. Set toolbar option in true in window section in package.json file to see browser elements in your app.

Resources