Node.js bridge for COBOL which allows you to run Node.js code from COBOL.
You have to install Node.js on your machine. In case you do not have a COBOL compiler, you can install it by running:
# Ubuntu sudo apt-get install open-cobol # OS X brew install gnu-cobol
* Compile this file together with the node.cobol * modules: * * $ cobc -x example/main.cbl lib/node-exec*.cbl * * Then execute the binary file: * * $ ./main IDENTIFICATION DIVISION. PROGRAM-ID. MAIN. DATA DIVISION. WORKING-STORAGE SECTION. 01 NODEJS-CODE PIC X(100) value "console.log('Hello World!')". PROCEDURE DIVISION. * Execute a short Node.js snippet CALL 'EXEC_NODEJS' USING NODEJS-CODE DISPLAY "Starting an HTTP server on port 8000". * Convert an image into ASCII/ANSI art CALL 'EXEC_NODEJS_FILE' USING "example/grace-hopper.js" DISPLAY "Starting an HTTP server on port 8000". * Starting an HTTP server in Node.js CALL 'EXEC_NODEJS_FILE' USING "example/server.js". STOP RUN.
To compile the program, use:
cobc -x example/main.cbl lib/node-exec*.cbl
❓ Get Help
There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues.
- For direct and quick help, you can use Codementor.
The COBOL modules from the
lib/ directory export the following subroutines:
code: The Node.js snippet to execute.
file: The Node.js file path.
😋 How to contribute
Have an idea? Found a bug? See how to contribute.
💖 Support my projects
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
Starring and sharing the projects you like
Bitcoin—You can send me bitcoins at this address (or scanning the code below):