Giter VIP home page Giter VIP logo

Comments (10)

meztez avatar meztez commented on July 26, 2024

@slodge Could you describe how you would use it?

What would be the advantage/distinction compared to?

pr <- plumber::plumb(dir = ".")

Thank you

from plumber.

slodge-work avatar slodge-work commented on July 26, 2024

Our team would use it in the same way they use it in Shiny.

It would "just work" when deploying to Connect in the same way it does when they use it in Shiny.

from plumber.

meztez avatar meztez commented on July 26, 2024

Maybe a code example? It would help me understand what is required to build the feature you are referencing.

As I understand it, the loadsupport does the same thing as plumb dir + run?

What am I missing?

How does it relate to connect?

from plumber.

slodge avatar slodge commented on July 26, 2024

Sure....

File1 - plumber.R

library(plumber)

#* @apiTitle Plumber Example API
#* @apiDescription Plumber example description.

#* Do foo
#* @param msg The message to foo
#* @get /do
function(msg = "") {
  foo(msg)
}

File 2 - support.R

foo <- function(m) {
  m
}

Run locally in RStudio using "Run API" button:
image

Deployed to Connect:
image

from plumber.

meztez avatar meztez commented on July 26, 2024

Oh, I get it now. Seems simple enough.

from plumber.

slodge avatar slodge commented on July 26, 2024

Also... I don't think plumber::plumb(dir = 'Plumber/MulitFile/plumber/.') |> plumber::pr_run() works either... I think that plumb stage only parses for endpoints?

image

(Learning as I go here)

from plumber.

meztez avatar meztez commented on July 26, 2024

Idea : Maybe also support hotreload when source file change on disk.

from plumber.

slodge avatar slodge commented on July 26, 2024

Idea : Maybe also support hotreload when source file change on disk.

Separate issue?
(Not saying it's a bad idea - just that neither the use case nor the implementation really overlap - suspect hotreload would require much more work, including javascript inside swagger front ends)

from plumber.

schloerke avatar schloerke commented on July 26, 2024

Idea : Maybe also support hotreload when source file change on disk.

Separate issue?

Yes, please.

from plumber.

slodge avatar slodge commented on July 26, 2024

This isn't a hugely important issue.

Respectfully closing.

from plumber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.