Created
February 6, 2011 18:24
-
-
Save bdarcus/813579 to your computer and use it in GitHub Desktop.
hello world in coffeescript, using express framework for node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Goal: | |
# $ npm install citenode | |
# $ citenode start [optional parameters] | |
# etc. | |
# Should be completely independent of any particular | |
# application. | |
express = require 'express' | |
fugue = require 'fugue' | |
citeproc = require 'citeproc' | |
app = express.createServer() | |
# here we want to wrap citeproc; not sure how to do this | |
# or what post methods we want | |
app.post '/makebib', (req, res) -> | |
params = req.body | |
res.send(citeproc.makeBibliography(params)) | |
# let fugue manage the details | |
fugue.start app, 3000, null, 2, { | |
verbose: true | |
} | |
console.log "CiteProc server listening on port 3000" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment