Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run in detached mode 🔗 #73

Closed
jessicafarias opened this issue Jul 14, 2021 · 4 comments
Closed

Run in detached mode 🔗 #73

jessicafarias opened this issue Jul 14, 2021 · 4 comments

Comments

@jessicafarias
Copy link

jessicafarias commented Jul 14, 2021

In order to avoid to keep the terminal open and to have multiple paths listening.
I was wondering if you can implement a -d option to keep run and listening witouth having a terminal open in detached mode or in the background from terminal. And also a way to check all running process in smee such as docker does with -d and ps.
where: d=detach and ps=process status

user@user:~$ smee -d
Forwarding https://smee.io/1PUc3ipJCAKIMTaR to http://127.0.0.1:3000/
Connected https://smee.io/1PUc3ipJCAKIMTaR
Detached

user@user:~$ smee ps
URL                                     PATH      PORT
https://smee.io/1PUc3ipJCAKIMTaR         /        3000

OR:

user@user:~$ smee -d -u https://smee.io/new -P /custom_path/ -p 8080
Forwarding https://smee.io/new to http://127.0.0.1:8080/custom_path
Connected https://smee.io/new
Detached

user@user:~$ smee ps
URL                         PATH                PORT
https://smee.io/new         /custom_path        8080
@gr2m
Copy link
Contributor

gr2m commented Jul 14, 2021

Hey Jessica, I wouldn't mind that, but isn't that something you can do with built-in unix tools, without the necessity to add support for a -d flag? I'm no expert, just wondering.

What would it entail to add the -d flag? I've never implemented such a feature before

@jessicafarias
Copy link
Author

jessicafarias commented Jul 14, 2021

I'm not sure, I found something similar here:
https://www.tecmint.com/run-linux-command-process-in-background-detach-process/

where you can use the & on linux

jessica@jessica:~$ smee &
Forwarding https://smee.io/99hqrIEtrRkb0B8y to http://127.0.0.1:3000/
hConnected https://smee.io/99hqrIEtrRkb0B8y
[1]+  Running              smee &

jessica@jessica:~$ smee -u https://smee.io/new -P /custom_path/ -p 8080 &
[2]+  Running              smee ... &

jessica@jessica:~$ jobs
[1]+  Running              smee &
[2]+  Running              smee ... &

I'm already tested and I almost got the same result, I can keep more than 1 path listening in just one terminal, but when I close the terminal the "jobs" finished.

In this guide, we will explain how to start or run a Linux command or process in background and completely detach a process from its controlling terminal.

@gr2m
Copy link
Contributor

gr2m commented Jul 14, 2021

do you want the smee process to run in the background, even if you close the terminal window? I don't feel like this is within the scope of the smee cli, I think the different operating systems have their own tooling to achieve that, e.g. running the process as a daemon on unix systems?

@jessicafarias
Copy link
Author

jessicafarias commented Jul 19, 2021

I got confused with this repo and smee-client repository.
I created a new issue in the proper repository here
But you're right I can get the same result with smee-client and create a daemon on unix systems.

Thanks @gr2m !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants