-
-
Save fguisso/14040aead461e74fabf017c95e784e6d to your computer and use it in GitHub Desktop.
This file contains 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
const express = require('express'); | |
const app = express(); | |
const port = process.env.PORT || 8080; | |
app.get('/', (req, res) => { | |
res.send('Hello!') | |
}) | |
app.listen(port); |
This file contains 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
var express = require('express'); | |
var test = express(); | |
var port = process.env.PORT || 8080; | |
//routes | |
test.get('/api/users', function(req, res){ | |
var user_id = req.param('id'); | |
var token = req.param('token'); | |
var geo = req.param('geo'); | |
res.send(user_id + ' ' + token + ' ' + geo); | |
}); | |
// | |
test.listen(port); | |
console.log('test port: ' + port); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment