Skip to content

grddavies/idler

Repository files navigation

idler

R-CMD-check

Boot idle users off your shiny server 💤

Installation

You can install the development version of idler from GitHub with:

# install.packages("devtools")
devtools::install_github("grddavies/idler")

Example

How to use idler to manage user sessions in your Shiny app:

library(shiny)
ui <- function(){
  tagList(
    idler::use_idler(),
    tags$h1("idler demo")
  )
}

server <- function(input, output, session) {
  # Boot idle users after 2s
  idler::set(2)
}

shinyApp(ui, server)

Acknowledgements

The JavaScript event listeners at idler's core are lifted straight from this stack exchange answer. Credit for that (crucial) bit of functionality goes to Pork Chop

About

Boot idle users off your shiny server 💤

Topics

Resources

License

Stars

Watchers

Forks