πͺ This repository contains C++ Addons Examples for NodeJS.
The main idea is to document with examples and tips on how to create plugins with C ++ for Node.js. C and C ++ were my first programming languages, I learned the basics with them and I am very fond of them (although I am rusty π).
- Node.js | C++ addons
- Github | Node.js native addon build tool
- v8 API
- C++ and Node.js: An Unholy Combinationβ¦.But Oh So Right
- Tutorial C++
Quality Assurance Code (QAC)
- ESTlint, tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.
NPM ESLint
NPM ESLint | Airbnb
In order to work with this project, your local environment must have at least the following versions:
- NodeJS Version: 14.xx
- NPM Version: 6.14.7
$npm i
$node ./src/'folder'/'file.js'
$npm i -g node-gyp
$node-gyp configure
$node-gyp build
/
βββ assets π # Images Sources.
βββ env π # Configure enviroments deploy.
βββ src π―
| βββ hello-world
| | βββ example01 # Show Hello word message.
| | βββ example02 # Add colors and reset default color.
| |
| βββ data-types
| | βββ example01 # Working with int, float and double.
| | βββ example02 # Working with char and char array.
| | βββ example03 # Working with string.
| | βββ example04 # Working with bool.
| |
| βββ arrays
| | βββ example01 # Create array with int values and show by index.
| | βββ example02 # Read the number of bytes that an array with int occupies.
| | βββ example03 # Create array with strings values and show by index.
| | βββ example04 # Read the number of bytes that an array with strings occupies.
| | βββ example05 # Execute other function and return array strings.
| | βββ example06 # Execute other function with internal bucle for and return array strings.
| | βββ example07 # Execute other function with internal bucle for and show the array size.
| |
| βββ operators
| | βββ example01 # Sum, sub, multi and div with two int.
| | βββ example02 # Increment and decrement with two int.
| | βββ example03 # Working with div and precision with decimals.
| |
| βββ conditionals
| | βββ example01 # Use if and else conditionals.
| | βββ example02 # Working with switch conditionals.
| |
| βββ bucles
| | βββ example01 # Working with bucle while.
| | βββ example02 # Working with bucle for.
| | βββ example03 # Working with bucle do while.
| | βββ example04 # Working with nested loops.
| |
| βββ methods
| | βββ example01 # Define two public method into the addons.
| | βββ example02 # Define two public method and one internal.
| |
| βββ params
| | βββ example01 # Get if param is number, string and the length.
| |
| βββ returns
| | βββ example01 # Return from addon to js the number of params.
| | βββ example02 # Return from addon to js the value of the param.
| βββ ...
βββ ...
For review and update all npm dependences of this project you need install in global npm package "npm-check-updates" npm module.
# Install and Run
$npm i -g npm-check-updates
$ncu
Created with JavaScript, lot of β€οΈ and a few βοΈ