Skip to content

A comprehensive Node.js application that displays detailed system information and HTTP request/response properties, similar to PHP's `phpinfo()` but for Node.js environments.

Notifications You must be signed in to change notification settings

nikitacano/nodeinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js System Info Server

A comprehensive Node.js application that displays detailed system information and HTTP request/response properties, similar to PHP's phpinfo() but for Node.js environments.

Preview

Features

  • System Information: Hostname, OS, CPU, memory, uptime, load average
  • Disk Usage: Real-time disk usage statistics with free space percentage and used space in GB
  • Network Details: All network interfaces with IP addresses
  • HTTP Request Info: Method, headers, cookies, query parameters
  • Client Details: IP address, geolocation (country, city, coordinates)
  • Response Tracking: Status codes, response times, headers
  • Process Information: Memory usage, environment variables, Node.js versions
  • Multi-Port Support: Listens on multiple ports simultaneously (3000 and 80)
  • Beautiful UI: Modern, clean design with card-based layout

Installation

# Install dependencies
npm install

# Start the server
npm start

# Or use nodemon for development
npm run dev

Usage

  1. Start the server:

    npm start
    
    # Note: Port 80 requires elevated privileges
    # For port 80 access, run with sudo:
    sudo npm start
  2. Open your browser and navigate to:

    http://localhost:3000  # Regular port
    http://localhost       # Port 80 (if running with sudo)
    
  3. The page will display:

    • Host machine details (OS, hostname, CPU, memory)
    • All incoming HTTP request properties
    • Client information including geolocation
    • Response details and timing
    • Environment variables (sensitive ones are hidden)
    • Network interfaces and IP addresses

API Endpoints

All routes (/*) return the same comprehensive information page. You can access it with any HTTP method (GET, POST, PUT, etc.) and the page will display the method used.

Query Parameters

Add query parameters to see them displayed:

http://localhost:3000?test=value&debug=true

Cookies

The application automatically parses and displays any cookies sent with the request.

Security

  • Sensitive environment variables (containing PASSWORD, SECRET, KEY, TOKEN, API, PRIVATE) are automatically hidden
  • Client IP addresses are properly extracted even behind proxies
  • All data is displayed in a read-only format

Dependencies

  • express: Web framework
  • cookie-parser: Cookie parsing middleware
  • geoip-lite: IP geolocation
  • os-utils: Extended OS utilities
  • diskusage: Disk usage statistics

Port Configuration

The server listens on ports 3000 and 80 by default. Port 80 requires elevated privileges:

# Regular user (port 3000 only)
npm start

# With elevated privileges (both ports 3000 and 80)
sudo npm start

To modify the ports, edit the PORTS array in server.js.

License

MIT

About

A comprehensive Node.js application that displays detailed system information and HTTP request/response properties, similar to PHP's `phpinfo()` but for Node.js environments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published