Skip to main content

Running the Server

To run the express-js back-end project locally, run node .\server.js and the WIDE client should start on the relevant port, http://localhost:3000 by default;

Environment Variables

Warning

The Server's environment file contains highly sensitive information and must be managed appropriate and NEVER be shared!

The WIDE server's configuration must be placed in a .env file located the project root.

WEB_DOMAIN="http://localhost:4200" //The WIDE Client Domain
SIWE_MESSAGE_EXPIRY_SECONDS=300
COOKIE_DOMAIN=LOCAL
COOKIE_USE_SECURE=false
COOKIE_SAME_SITE=lax
COOKIE_EXPIRY_MILLISECONDS=3600000
SESSION_SECRET=00000000000 //Define a Unique Session Secret
SESSION_STORAGE=REDIS
WIDE_CONTRACT="0x5FbDB2315678afecb367f032d93F642f64180aa3" //The Address for the Smart Contract
WEB3_NODE_URI="http://127.0.0.1:8545" //The Blockchain Node's URI
WEB3_PRIVATE_KEY="0x..." //The Server's unique wallet private key. This is used to sign messages and log them onto the smart contract. !! DO NOT SHARE THIS KEY
WEB3_PUBLIC_KEY="0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" //The Server's public wallet key.
UPSTASH_PORT=31994
UPSTASH_ENDPOINT=sample.upstash.io //Provided by Upstash
UPSTASH_PASSWORD=upstash_password //Provided by Upstash