This example demonstrates how to use FrostBite in a live project environment.
- Express.js web server with runtime decryption of configuration
- Automatic reloading of configuration when files change
- Memory-only decryption (no decrypted files on disk)
- File watching for automatic updates
-
Install dependencies:
npm install -
Encrypt the configuration:
npm run encrypt-config -
Start the server:
npm start -
Visit http://localhost:3000 to see the application
- The application uses FrostBite's runtime API to decrypt configuration files in memory
- No decrypted files are written to disk, enhancing security
- The application watches for changes to encrypted files and automatically reloads
- When the application shuts down, resources are cleaned up properly
-
Decrypt the configuration:
npm run decrypt-config -
Edit the
config.jsonfile -
Re-encrypt the configuration:
npm run encrypt-config
The application will automatically detect the change and reload the configuration.
PORT: Port to run the server on (default: 3000)FROSTBITE_KEY: Encryption key (default: example-key-123)