3.0.0 • Published 3 years ago
inkstats-v2 v3.0.0
Table of Contents
- Table of Contents
- Getting Started: CLI
- Getting Started: Module
- Local Development
- CLI Options
- Module Options
- Module Commands
- Documentation
- Contributing
Requirements
npm
oryarn
- Nodejs v12 +
Installing Globlly
- npm:
npm i -g inkstats-v2
- yarn:
yarn add globle inkstats-v2
- Shell Script (Coming soon)
Installing as a Module
- npm:
npm i --save inkstats-v2
- yarn:
yarn add inkstats-v2
Information that InkStats Shows
- Total Ram
- CPU Speed
- CPU Cores
- CPU Information
- Platform
- Computer Uptime
- Hostname
- More Coming Soon
Getting Started: CLI
- Install InkStats v2 See Installing Globlly
Web Server
- In your Terminal run
inkstats-v2 serve
to start a basic InkStats Server - See More About the CLI here
CLI Stats
- In your Terminal run
inkstats stats
to see all you basic computer stats. - See More About the CLI here
Getting Started: Module
- Install InkStats v2 (Module)
- Make a New InkStats Instance in your nodejs project
// InkStats Module Example
const { InkStats } = require('inkstats-v2') // Require InkStats
/**
* Makes a New InkStats Instance
*/
const server = new InkStats({
/**
* The Port you want your InkStats Instance to run on
* Not Required, Defaults to port 8080
*/
port: 8080,
/**
* A Message to be logged to your Console when your InkStats Instance Starts
* Not Required, Defaults to Nothing (Nothing will be logged to your Console)
* {port} will output will the port your InkStats Instance is running on
*/
message: 'Hello {port}',
/**
* Sets the Title of your InkStats Instance, It will show on your InkStats Home Page
* Not Required, Defaults to InkStats
*/
name: 'My Epic Name'
})
// Usage Examples
/**
* Stops your InkStats Instance
* Required to Start your InkStats Process
*/
server.start()
/**
* Stops your InkStats Instance
* Not Required, Killing the node process will also stop InkStats
*/
server.kill()
- For More Examples Check the Examples Folder in the Repo
- See more about the Module here
Local Development
- Clone the Repo:
git clone https://github.com/Lucaslah/InkStats-v2.git
- Chnage to the Dir you cloned:
cd InkStats-v2
- Install Required Stuff:
yarn
ornpm install
- Start the app:
yarn start serve
ornpm start serve
Documentation
See the Wiki