mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-10 07:28:01 -05:00
These functions were temporarily ripped out of Shiny and moved to the htmltools package. We've discovered that it's safe to keep including them in shiny; as long as the functions in shiny and the functions in htmltools are identical, the user won't receive a conflict warning.
42 lines
1.2 KiB
R
42 lines
1.2 KiB
R
% Generated by roxygen2 (4.0.1): do not edit by hand
|
|
\name{shinyServer}
|
|
\alias{shinyServer}
|
|
\title{Define Server Functionality}
|
|
\usage{
|
|
shinyServer(func)
|
|
}
|
|
\arguments{
|
|
\item{func}{The server function for this application. See the details section
|
|
for more information.}
|
|
}
|
|
\description{
|
|
Defines the server-side logic of the Shiny application. This generally
|
|
involves creating functions that map user inputs to various kinds of output.
|
|
}
|
|
\details{
|
|
Call \code{shinyServer} from your application's \code{server.R} file, passing
|
|
in a "server function" that provides the server-side logic of your
|
|
application.
|
|
|
|
The server function will be called when each client (web browser) first loads
|
|
the Shiny application's page. It must take an \code{input} and an
|
|
\code{output} parameter. Any return value will be ignored. It also takes an
|
|
optional \code{session} parameter, which is used when greater control is
|
|
needed.
|
|
|
|
See the \href{http://rstudio.github.com/shiny/tutorial/}{tutorial} for more
|
|
on how to write a server function.
|
|
}
|
|
\examples{
|
|
\dontrun{
|
|
# A very simple Shiny app that takes a message from the user
|
|
# and outputs an uppercase version of it.
|
|
shinyServer(function(input, output, session) {
|
|
output$uppercase <- renderText({
|
|
toupper(input$message)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|