node-goog: Server-side Google Closure with Node.js
e.g. implementations of common algorithms (encryption, geometry, time and date handling, ...), data structures (tries, pools, priority queues, ...)
and support for functional programming.
node-goog aims at making these features available on the Node.js platform.
You will need a separate installation of Google's Closure Library.
node-googitself is available as an npm package:
npm install goog
Or, get the source, fiddle around with it and install
git clone git://github.com/hsch/node-goog.git cd node-goog npm link
node-googin your application through Node's standard mechanism:
var goog = require( 'goog' ).goog;
Import any namespace from Google Closure like you would in a browser-based application:
goog.require( 'goog.structs.Trie' );
var trie = new goog.structs.Trie();
Start your application. Set
CLOSURE_BASE_PATHaccording to your own configuration:
CLOSURE_BASE_PATH=~/opt/closure-library/closure/goog/ node example.js
Copyright 2010 Hendrik Schnepel (email@example.com)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.