README.md

idler

R-CMD-check

Boot idle users off your shiny server :zzz:

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



grddavies/idler documentation built on July 27, 2022, 12:40 a.m.