Gomemextra is a Node.js utility for managing gosumemory processes and configurations.
- Install Gomemextra using npm:
npm install gomemextra
- Import gomemextra in your Node.js project:
const gomemextra = require('gomemextra');
Create a new instance of gomemextra:
const gomemextra = new Gomemextra();
const gomemextra = new Gomemextra(logEnabled, errorEnabled);
// logEnabled (default: true): Set to false to disable logs.
// errorEnabled (default: true): Set to false to disable errors.
// Launch gosumemory process
gomemextra.launch();
// Close gosumemory process
gomemextra.close();
// Get server IP address
const address = gomemextra.getAdress();
console.log('Server IP Address:', address);
// Get update value
const update = gomemextra.getUpdate();
console.log('Update Value:', update);
gomemextra.setPort(8080);
// Set update value
gomemextra.setUpdate(5000);
// Retrieve data from gosumemory service
try {
const data = await gomemextra.data();
console.log('Data from gosumemory:', data);
} catch (error) {
console.error('Error retrieving data:', error.message);
}
Gosumemory Github for gosumemory project
Contributions are welcome! If you find any issues or want to add new features, feel free to submit a pull request.