Add ngrok command
This commit is contained in:
parent
4632903735
commit
d93f91a0e1
@ -3111,3 +3111,18 @@ A fuzzy-finder for notes.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package pollen-mode)
|
||||
#+END_SRC
|
||||
* Ngrok
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun ngrok (port &optional subdomain)
|
||||
(interactive "nPort: \nsSubdomain: ")
|
||||
(let ((buf (get-buffer-create
|
||||
(concat "*ngrok-"
|
||||
(number-to-string port)
|
||||
"*")))
|
||||
(cmd (if (and subdomain (not (string-empty-p subdomain)))
|
||||
(concat "ngrok http "
|
||||
"--subdomain=" subdomain " "
|
||||
(number-to-string port))
|
||||
(concat "ngrok http " (number-to-string port)))))
|
||||
(async-shell-command cmd buf)))
|
||||
#+END_SRC
|
||||
|
Loading…
Reference in New Issue
Block a user