Thursday, April 12, 2012

Getting Started with Unstable Express-Spdy

‹prev | My Chain | next›

Up tonight, I get started porting express-spdy to the unstable branch of node.js. The node.js project follows the convention of an unstable release having odd version numbers. The latest series is 0.7, so I grab the most recent tarball and configure it for edge openssl (to get the NPN goodness needed for SPDY:
➜  src  tar zxf ~/Downloads/node-v0.7.7.tar.gz 
➜  src  cd node-v0.7.7 
➜  node-v0.7.7  ./configure --openssl-includes=$HOME/local/include --openssl-libpath=$HOME/local/lib --prefix=$HOME/local/node-v0.7.7
Then I build the executable:
➜  node-v0.7.7  make
make -C out BUILDTYPE=Release
make[1]: Entering directory `/home/cstrom/local/node-v0.7.7/out'
  CC(target) /home/cstrom/local/node-v0.7.7/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o
  AR(target) /home/cstrom/local/node-v0.7.7/out/Release/obj.target/deps/http_parser/libhttp_parser.a
...
  LINK(target) /home/cstrom/local/node-v0.7.7/out/Release/node
  LINK(target) /home/cstrom/local/node-v0.7.7/out/Release/node: Finished
make[1]: Leaving directory `/home/cstrom/local/node-v0.7.7/out'
ln -fs out/Release/node node
After make install, I have both node and npm installed for 0.7.7:
➜  ~  which node
/home/cstrom/local/node-v0.7.7/bin/node
➜  ~  which npm 
/home/cstrom/local/node-v0.7.7/bin/npm
I like npm being bundled with node.js -- that's one less step.

Next up, I try using the new node.js to run last night's generated express-spdy app:
➜  example-spdy  node app
Express server listening on port 3000 in development mode
Yay! It starts and... it still runs:


Running the generator and installing fresh will be a different story. For tomorrow.

Day #354

No comments:

Post a Comment