This is a sample application that uses Svelte as front-end engine and JWT handling with Express server.
To install, simply run
npm install
To start the mock application, two command windows are needed as one will serve the local development server for Svelte and the other one for the Node-Express server.
In this case, the server and client are combined just to provide a simple example and not to complicate things. No database was hooked as well for this matter and hard-coded data was used. The server is located inside the server folder.
# Svelte
npm run dev
# Node-express
npm run serve
The .env file is shared between the server and the client for this case to simplify things.
Both Access Token Secret and Refresh Token Secret can be replace with a new one by running
npm run generate:secret
to get a random 64bit long string.
There are 2 hardcoded users for this demo, namely Kyle and Gim where their password is both "abc123".