Skip to content

Instantly share code, notes, and snippets.

@simontabor
Created July 14, 2013 21:42
Show Gist options
  • Save simontabor/5996239 to your computer and use it in GitHub Desktop.
Save simontabor/5996239 to your computer and use it in GitHub Desktop.
var mysql = require('mysql')
http = require('http'),
url = require('url');
http.createServer(function (request, response) {
// Get the query
var query = url.parse(request.url, true).query.q;
mysql.query(query, function(e, r) {
response.send(r);
})
}).listen(8888);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment