You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-7Lines changed: 20 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,20 @@
11
11
12
12
## Can I use this on production?
13
13
14
+
14
15
Of course, you can! It's production ready! If you ever did such a thing, [ping me (@IonicaBizau)](https://twitter.com/IonicaBizau). :boom::dizzy:
15
16
16
17
17
18
## Installation
18
19
20
+
19
21
Currently GNUCobol is required. If you are using a debian-based distribution you can install it using:
20
22
21
23
```sh
22
24
$ sudo apt-get install open-cobol
23
25
```
24
26
27
+
25
28
:bulb: It would be interesting to fallback into a COBOL compiler written in NodeJS. [Contributions are welcome!][contributing]:smile:
26
29
27
30
Then, install the `cobol` package.
@@ -30,6 +33,7 @@ Then, install the `cobol` package.
30
33
$ npm i cobol
31
34
```
32
35
36
+
33
37
## :clipboard: Example
34
38
35
39
@@ -49,7 +53,11 @@ Cobol(function () {/*
49
53
DISPLAY "Hello world".
50
54
PROGRAM-DONE.
51
55
STOP RUN.
52
-
*/}, function (err, data) {
56
+
*/}, {
57
+
compileargs:{
58
+
free:true
59
+
}
60
+
}, function (err, data) {
53
61
console.log(err || data);
54
62
});
55
63
// => "Hello World"
@@ -113,9 +121,11 @@ There are few ways to get help:
113
121
114
122
1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.
115
123
2. For bug reports and feature requests, open issues. :bug:
124
+
116
125
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
117
126
118
127
128
+
119
129
## :memo: Documentation
120
130
121
131
@@ -128,7 +138,7 @@ Runs COBOL code from Node.JS side.
128
138
-**Object**`options`: An object containing the following fields:
129
139
-`cwd` (String): Where the COBOL code will run (by default in the current working directory)
130
140
-`args` (Array): An array of strings to pass to the COBOL process.
131
-
-`free` (Boolean): Use free option while compiling with GnuCobol
141
+
-`compileargs` (Object): Use to specificy cobc compiler options
132
142
-`stdin` (Stream): An optional stdin stream used to pipe data to the stdin stream of the COBOL process.
133
143
-`stderr` (Stream): An optional stderr stream used to pipe data to the stdin stream of the COBOL process.
134
144
-`stdeout` (Stream): An optional stdout stream used to pipe data to the stdin stream of the COBOL process.
@@ -165,6 +175,7 @@ this takes time. You can integrate and use these projects in your applications *
165
175
166
176
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:
167
177
178
+
168
179
- Starring and sharing the projects you like :rocket:
169
180
-[![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin::book:
170
181
-[![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
@@ -173,6 +184,7 @@ However, if you get some profit from this or just want to encourage me to contin
173
184
174
185

175
186
187
+
176
188
Thanks! :heart:
177
189
178
190
@@ -194,14 +206,15 @@ If you are using this library in one of your projects, add it in this list. :spa
0 commit comments