/node-krypton

Primary LanguageJavaScript

Node.js v22 HTTP Server with Streaming and Logging

This project is a simple HTTP server built using Node.js. It includes a custom logger with various log levels and serves HTML files, with an option to stream the content.

Features

  • Node.js v22
  • Supports streaming of partial HTML content
  • Custom logger with multiple log levels (fatal, error, warn, info, debug, trace) using styleText
  • Configurable log level via environment variables
  • Configurable server port via environment variables

Installation

Clone the repository

git clone https://github.com/dueen/node-krypton.git
cd node-krypton

Install dependencies

# nothing to install, have some tea instead

Usage

# Start the server in streaming mode
npm run dev:stream
# Start the server in non-streaming mode
npm run dev

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.