This project aims to demonstrate the integration of Go and Node.js using native modules. It combines the power of Go for performance-critical tasks and Node.js for its extensive ecosystem and ease of development.
The project's directory structure is as follows:
go-node-native/
├── go-native/
│ ├── Makefile
│ ├── example.d.ts
│ ├── index.js
│ ├── main.go
│ ├── package.json
│ ├── .nvmrc
│ ├── go.mod
│ ├── LICENSE
│ └── shared/
├── index.js
├── .nvmrc
├── LICENSE
└── package.json
- Install Node.js and Go on your system.
- Clone this repository:
git clone https://github.com/abhisekp/go-node-native.git
- Navigate to the project directory:
cd go-node-native
- Install project dependencies:
- For Node.js:
npm install
- For Go:
go mod download
To run the project, execute the following command in the project directory:
npm start
This will start the Node.js cli app and execute the Go code using the native module. The output will be displayed in the console.
Uses node:test
module to write the test cases.
npm test
This project is licensed under the MIT License.
See the LICENSE file for more details.
See CONTRIBUTING