Skip to content

Instantly share code, notes, and snippets.

@eightysteele
Created September 25, 2011 15:47
Show Gist options
  • Select an option

  • Save eightysteele/1240739 to your computer and use it in GitHub Desktop.

Select an option

Save eightysteele/1240739 to your computer and use it in GitHub Desktop.
var Windshaft = require('../lib/windshaft'),
config = {
base_url: '/database/:dbname/table/:table',
req2params: function(req, callback)
{
req.params.geom_type = 'multipolygon';
callback(null, req);
},
grainstore: {
datasource: {
user:'postgres',
host: '127.0.0.1',
port: 5432
}
},
redis: {
host: '127.0.0.1',
port: 6379
}
},
ws = new Windshaft.Server(config);
ws.listen(4000);
console.log("http://localhost:4000" + config.base_url + '/:z/:x/:y');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment