Skip to content
This repository has been archived by the owner on Aug 20, 2023. It is now read-only.
/ node-golang Public archive

πŸ’€ Golang bridge for Node.js, Run Golang On Node; Yay!

License

Notifications You must be signed in to change notification settings

0xDaksh/node-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’€ Golang for Node.

Build Status

Golang bridge for Node.js, eventually allowing you to run Golang code just directly from Node!

Installation

npm install --save golang

Pre-Requistes

You'd need a go-lang compiler, Download it from Here

API with Examples

Run

Params:

  • Input

Does:

  • Creates a File
  • Runs it
  • Output is logged out.
	var golang = require('golang')
	golang.run(`
		package main
		import "fmt"
		func main() {
		    fmt.Println("hello world")
		}
	`).then(() => {
		// output on the terminal
	}).catch(err => {
		throw err; // err code. 
	})

Build

Params:

  • Input

Does:

  • Creates a File.
  • Builds it from the File.
  • Loggs the url of the Build File.
	var golang = require('golang')
	golang.build(`
		package main
		import "fmt"
		func main() {
		    fmt.Println("hello world")
		}
	`).then(() => {
		// output on terminal + directory of build
	}).catch((e) => {
		throw e // err code.
	})

πŸ’€ Contributions

Want to Improve it? Sure, Please Submit an Issue or a Pull Request :)

πŸ“œ License

Licensed Under MIT 2017 Β© to Daksh Miglani, Please Give Credit when used :)

About

πŸ’€ Golang bridge for Node.js, Run Golang On Node; Yay!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published