Skip to content

Instantly share code, notes, and snippets.

@judepereira
Last active October 18, 2019 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save judepereira/c45f9080def481c0917af77c6b9e9d11 to your computer and use it in GitHub Desktop.
Save judepereira/c45f9080def481c0917af77c6b9e9d11 to your computer and use it in GitHub Desktop.
A simple story in Storyscript which prints a the page load counter
http server as server
when server listen path: "/" as req
current = (redis get key: "count").result
if current == null
current = 0
current = current + 1
redis set key: "count" value: current
req write content: "This page has loaded {current} times.<br>Powered by https://gist.github.com/judepereira/c45f9080def481c0917af77c6b9e9d11"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment