System Information using OS Module
Easy
2
46.2% Acceptance
In this lab, you will be using the os
module to extract system information such as hostname, OS type, and architecture. The os
module is built into Node.js and provides OS-related utility methods and properties. Your task is to create a system-info.js
module that exports an object containing the selected system information. Example output:
{
hostname: 'my-pc',
ostype: 'Linux',
arch: 'x64'
}
Do not include any additional modules or libraries. All code should be written using standard Node.js and ESM features.