grddavies / idler

Boot idle users off your shiny server :zzz:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 :zzz:

License:MIT License


Languages

Language:R 55.1%Language:JavaScript 44.9%