在build/dev-server.js文件下
const app = express()
var appData = require('../goods.json')
var goods = appData.goods
var apiRoutes = express.Router()
apiRoutes.get('/goods', function(req, res) {
res.json({
data: goods
})
})
app.use('/api', apiRoutes)