Skip to content

Instantly share code, notes, and snippets.

@Xe
Created August 24, 2019 20:49
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 Xe/8f5ca6baa68186247433a7fcfff71b50 to your computer and use it in GitHub Desktop.
Save Xe/8f5ca6baa68186247433a7fcfff71b50 to your computer and use it in GitHub Desktop.
import asyncdispatch, jester
settings:
port = Port(9001)
router api:
before:
try:
discard request.cookies["auth_token"]
except:
halt Http403, "permission denied"
routes:
extend api, "/api"
get "/":
resp Http200, "hahaha it's is an laughter image"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment