Skip to content

Instantly share code, notes, and snippets.

@johnlahboo
Created November 9, 2016 16:06
Show Gist options
  • Save johnlahboo/b4df2be74ea9ecbfb0684ef3f0c67b7b to your computer and use it in GitHub Desktop.
Save johnlahboo/b4df2be74ea9ecbfb0684ef3f0c67b7b to your computer and use it in GitHub Desktop.
var express = require('express')
var app = express()
app.get('/footballPlayers', function(req, res) {
var json_string = {"players":[
{"name":"Messi", "goals":8},
{"name":"Ronaldo", "goals":22},
{"name":"Costa", "goals":20},
{"name":"Neymar", "goals":13},
{"name":"Arabi", "goals":6},
{"name":"Bale", "goals":3},
{"name":"Toquero", "goals":0}]};
res.json(json_string)
})
app.listen(3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment