How can I respond in XML using ExpressJS?
问题 I have a simple code that gives a JSON response for a specific route. Here's my current code: var express = require('express') , async = require('async') , http = require('http') , mysql = require('mysql'); var app = express(); var connection = mysql.createConnection({ host: 'localhost', user: '****', password: "****", database: 'restaurants' }); connection.connect(); // all environments app.set('port', process.env.PORT || 1235); app.use(express.static(__dirname + '/public/images')); app.get(