Skip to content

Instantly share code, notes, and snippets.

@ronaiza-cardoso
Created February 3, 2017 15:30
Show Gist options
  • Save ronaiza-cardoso/4e99ed36430d4c2d9047c6006da483fb to your computer and use it in GitHub Desktop.
Save ronaiza-cardoso/4e99ed36430d4c2d9047c6006da483fb to your computer and use it in GitHub Desktop.
'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