williamfligor / fortune

Fortune for Node.js
15 stars 12 forks source link

Add command line #3

Open piranna opened 9 years ago

piranna commented 9 years ago

Add a command line executable so the module can be directly used. It's content can be as simple as the example showed in the readme file.

hub-sp commented 5 years ago

I found this and I did the following, if you even care any more:

#!/usr/bin/env node
const ft = require('fortune-teller');
console.log(ft.fortune());

And in my ~/.bashrc:

alias fortune='path-to-file'

You may have to give the node file executable permissions

I am working on a fortune remake for node with a CLI option