I better say not too much. This code might do the job.
setwd("~/code/geoplumber/my_app")
if(!geoplumber::gp_is_wd_geoplumber())
stop("!gp_is_wd_geoplumber()")
system("kill -9 $(lsof -ti tcp:3000)")
print(system("lsof -i :3000"))
system("npm start &")
# check ps again
print(system("lsof -i :3000"))
print("R console not blocked and that is all gp needed, I think!")
I better say not too much. This code might do the job.
Cannot use
reprex
for some reason.