Created
February 3, 2017 15:30
-
-
Save ronaiza-cardoso/4e99ed36430d4c2d9047c6006da483fb 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
'use strict' | |
const express = require('express') | |
const Analytics = require('./src/index') | |
const app = express() | |
const PORT = process.env.PORT || 8000 | |
app.get('/api', (req, res) => { | |
const username = req.param('username') | |
const languages = new Analytics() | |
languages.sendData(username) | |
res.json(languages) | |
res.send(username) | |
}) | |
app.listen(PORT, () => { | |
console.log(`Express Server is listening on port: ${PORT}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment