let's get a little more systematic with our notes docs now. this will make it a bit easier to turn this into a tutorial some day.
So for right now I'll break things down first by bullets of what we did last time and what we should try for this time (and we can load up "next time" with a wish list.)
npm i airtable
/airtable
routeejs
template that displays json
dataJSON.stringify
methodwe also had an evening session in which we:
cli.js
and added a "shebang" to to the top that instructs terminal to run our script from a special launch word we define. The shebang goes at the top of your cli.js
file and it looks like:#!/usr/bin/env node
package.json
document that specifies an executable script's path (./cli.js
) and pairs it with an arbitrary word of our choosing that we'll use to launch the script:"bin": {
"my-launch-word": "./cli.js"
},
cli.js
we added a console log function to let us know it's working: console.log('it is working');
npm link
to install your package globally while in development, making my-launch-word
work from anywhere you happen to be in Terminal. Ultimately, when you publish your package to npmjs.com, other people (including future you) will run npm i -g [your_package]
to get the same effect.I think maybe the next steps are these:
req.params
/airtable/:record_id
cli.js
file and npm link
to create commands? And think about what sorts of commands we might want to build?