A very simple example project for working with Architect JWE and database-backed sessions in JS or Python
This project comes in JavaScript (Node.js) and Python flavors, see: js/
and py/
.
In both cases, the instructions for getting started are the same, as found below!
cd
intojs/
orpy/
- Run:
npm install
; if using Python, also be sure to runpip3 install -r ./requirements.txt
- Start the Sandbox:
npm run start
- Visit the test app at
http://localhost:3333
- By default, this app is configured with DynamoDB-backed sessions; the easiest way to test JWE sessions is to comment out the contents of the
.env
file - This app is deployable! Ship it to AWS to test it live if you like.
- Handler logic is found in
src/http/
:get /
- contains the basic session setup and web formget /count
- is a simple session counter incrementer endpointget /reset
- is a simple session reset endpoint