Created
December 2, 2015 22:26
-
-
Save samueleresca/4048d90658aab0202b04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//DEPENDENCIES | |
var express = require('express'); | |
//Initialize Express.js | |
var app = express(); | |
//JSON Get Request | |
app.get('/endpointJSON', function(req, res){ | |
//LOG | |
console.log('JSON response'); | |
console.log(req.query); | |
//JSON Response | |
res.json(req.query); | |
}); | |
//Starting the server | |
app.listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment