Application Template for Thin Hook Preprocessor
- App Template for Thin Hook Preprocessor
- Apps
- React app in TypeScript
- Lit app in TypeScript
- Lit app in JavaScript (default)
- Prerequisites
- Linux OS (Ubuntu recommended)
- Node.js (>=18 LTS)
- GCC compiler (g++)
- Google Chrome for Linux
- openssl
- nginx (for test)
- Clone the Repo
git clone https://github.com/t2ym/hooked-app
- Install Dependencies
cd hooked-app
npm run pack # download packages via npm pack
npm install
npm install # optional dependencies
- Install Certificates
Optionally, you can copy trusted certificates for an existing thin-hook project to keys/demoCA/
instead of generating and installing them
npm run build:monitor # build the monitor mode server
# Input an empty password for the generated client certificate
google-chrome &
# Navigate to chrome://settings/certificates
# Import the generated demo root CA
# hooked-app/keys/demoCA/demoCA.crt
# at Authorities tab in Manage Certificates pane
# Import the generated client certificate
# hooked-app/keys/demoCA/client.pfx
# at Your certificates tab in Manage Certificates pane
npm run start:monitor # start the monitor mode server
# Open https://localhost:8080/ and
# Check if the certificate for the site is trusted
# Ctrl-C to shutdown the monitor server
- Test
# Start the monitor mode server
npm run start:monitor
- In another terminal
npm run test:browser
# Chrome browser opens
# Click ▶ to start the test
# Close the browser to quit the test:browser script
# Non-interactive test
npm test
- Build
npm run build
- Start the Server
npm start
- Open the App
google-chrome https://localhost:8080/ &
- Open the empty skeleton of Validation Console
google-chrome https://localhost:8082/ &
# Select the client certificate
- Change the value of
this.path.raw
asraw-lit
by setting the array index from2
to0
- Set the environment variable
SERVER_HOST
as the server hostname in FQDN- If the variable is not defined, the default hostname is
localhost
- If the variable is not defined, the default hostname is
- Update the value of
this["generate-version"].version
, or - Select the version generation scheme at
this["generate-version"].scheme
- The example modular access policies at
config/policy/
are still experimental- Monolithic policies are recommended
- The UI libraries at
compat-lib
are old and have to be updated