/GitHub-profiles

playing with a node server and gitHub API

Primary LanguageJavaScript

GitHub Profiles

Introduction

An introduction to Node. We were required to setup a Node server and create a single page app that could load GitHub profiles using Ajax calls to the GitHub API.

screenshot

Technologies Used

  • Javascript
  • JQuery
  • Ajax
  • Mocha-casperjs
  • HTML
  • ejs
  • Mustache
  • CSS

Instructions

Clone the repository:

$ git clone git@github.com:guspowell/GitHub-profiles.git

Change into the repository:

$ cd GitHub-profiles

Start the server:

$ npm start

Open: http://localhost:3000/

Favourite Code Snippet

$.get('https://api.github.com/users/'+ username, function(user){
  var newProfile = Mustache.render($('#profile-template').html(), user);
  $(newProfile).appendTo('.profile-container');
  $('.profile-container').slideDown();
})

Still to complete/refactor

  • Tests
  • Only the first profile slides down

Takeaway

This was a very intense week in that we were introduced to so many new things. Node, Grunt, Ajax and Mustache to name a few.