Node & Express as Workflow Tools
description
Transcript of Node & Express as Workflow Tools
Building Custom Development Tools With Node.js
Commander.js
Topher BullockSoftware Engineer - Pivotal
@topherbullock
.. and other tools to help along the way.
About● Topher Bullock● Software Engineer - Pivotal;
working on Cloud Foundry Services.
● Full-stack JavaScript
@topherbullock pivotal-topher-bullock
● Faster / Easier Development● Rapid Prototyping● Task Automation● Test Driven Development● Build Systems● Debugging
Case Study : Tomcat Woes
● Large scale JS MVC app ● leveraging APIs served by Spring*● eventually need to deploy everything
together in one big happy .war file● working on everything together meant being
tied to an IDE to deploy web app changes to Tomcat ~> slow development.
* Disclaimer : Spring is totally cool and is a solid framework for Java projects. They are making strides for improving workflows; e.g Spring Boot
Observability
Browser
Tomcat
File System(Workspace)
IDE
Using a traditional stack in production doesn’t mean you can’t
use Node.js for development.
Enterprises will resist deploying Node.js in favor of other
technologies.
Commander.js
JIFASNIFJavaScript is Fun And
So Node.js is Fun“ ”
● CLI tool written in Node.js● Task Automation / Build Tool (mvn-ish)● Simple Config / Pre Built tasks
Grunt
Extending Grunt● Roll your own Grunt tasks● Programmatically run tasks and listen for
events
● The E in MEAN :3● Great for quickly spinning up a mock API
server● Good plumbing to serve front-end app for
development
Express
A Few CLI Libraries
Awesome colored output for console.
Progress bars, because they’re awesome.
Useful CLI Tools
General purpose CLI lib
Useful command prompt tools; works well alongside CommanderJSCommand.prompt() removed in 2.0.0
Contrary to the belief of many, ‘npm’ is not in fact an abbreviation for ‘Node Package Manager.’ It is a recursive bacronymic
abbreviation for ‘npm is not an acronym.’ (If it was ‘ninaa’, then it would be an acronym, and
thus incorrectly named.)
“”
● Not "Node Package Manager.".. but it is the Package Manager for Node. -_-
● Great for distributing your tools● $ npm link is your friend
NPM
Thanks!Questions?
@topherbullock pivotal-topher-bullock