Skip to content
Browse files

added a restful response for converting to geojson

  • Loading branch information...
1 parent c1e1e37 commit 106aeba79c862a638071d4ffd28bca990db4f950 @odoe committed Nov 23, 2011
Showing with 8 additions and 8 deletions.
  1. +8 −8 web.js
View
16 web.js
@@ -8,14 +8,6 @@ app.configure(function(){
app.set('view engine', 'jade');
app.use(express.bodyParser());
app.use(express.methodOverride());
- /*
- app.use(require('stylus').middleware({
- debug: true,
- src: __dirname + '/views',
- dest: __dirname + '/public',
- compile: compileMethod
- }));
- */
app.use(require('stylus').middleware({
debug: true,
src: __dirname + '/public',
@@ -49,6 +41,14 @@ app.get('/', function(req, res){
});
});
+app.get('/parse/:json', function(req, res){
+ var js = req.params.json;
+ deserialize(js, function(errors, jsonOut){
+ console.log("json parsed for request");
+ res.send(jsonOut);
+ });
+});
+
app.post('/', function(req, res) {
console.log("request from post");//, req.body.inJson);
var jsonInput = req.body.inJson.toString();

0 comments on commit 106aeba

Please sign in to comment.
Something went wrong with that request. Please try again.