mljar / mercury

Convert Jupyter Notebooks to Web Apps
https://RunMercury.com
GNU Affero General Public License v3.0
3.99k stars 253 forks source link

Running mercury notebook with '--no-browser' option #443

Open mbsherma opened 5 months ago

mbsherma commented 5 months ago

Whenever I run a mercury app, I've found that it automatically opens a browser window on whichever port I specify. Is there a way to use 'mercury run' without automatically opening the browser? I'm looking for something similar to the jupyter notebook `--no-browser' flag, which has a similar function. The command I currently use is below:

mercury run notebook.ipynb localhost:8845

Which gives the following output:

`

 _ __ ___   ___ _ __ ___ _   _ _ __ _   _ 
| '_ ` _ \ / _ \ '__/ __| | | | '__| | | |
| | | | | |  __/ | | (__| |_| | |  | |_| |
|_| |_| |_|\___|_|  \___|\__,_|_|   \__, |
                                     __/ |
                                    |___/ 

Version: 2.3.10 The notebook notebook.ipynb will be updated Successfully updated a notebook (id:7) Performing system checks...

System check identified no issues (0 silenced). April 30, 2024 - 16:11:17 Django version 4.2.3, using settings 'server.settings' Starting ASGI/Daphne version 4.1.0 development server at http://localhost:8845/ Quit the server with CONTROL-C.

`

Thanks in advance!

pplonski commented 5 months ago

Hi @mbsherma ,

Thanks for opening the issue. I like the idea of adding a flag, we will implement it @apjanusz

mbsherma commented 5 months ago

Great! I think it'll be a useful function, thanks!