Skip to content

Run the project and install tools

sdunand edited this page May 29, 2013 · 8 revisions

Step 1 : Install programs :

Download & install node.js : http://nodejs.org/
Download & install Aptana (recommended) or XAMPP : http://www.aptana.com/products/studio3/download, http://sourceforge.net/projects/xampp/

You must have an "Apache web server" installed on your computer if you want to run the client website locally. It is included in Aptana and in XAMPP.

Step 2 Download files from git and connect files with program :

Download the project from github : https://github.com/falkin/OSFGamificationProject

With Aptana :
File -> import -> Git repository as new projet -> URL of the github repository : https://github.com/falkin/OSFGamificationProject.git Then click next, next, ...

With XAMPP :
Import the project in the Apache workspace: http://stackoverflow.com/questions/10157333/xampp-change-document-root

Step 3 Run serveur side :

There are 3 folders in the project:

  • admin: used to fill in the database of the REST server with some fake data
  • client: contains the client website. It used the REST API of the server
  • server: contains the REST server

Pour créer un petit serveur de test, j'ai suivi les deux premiers chapitres ici (A lire) : http://expressjs.com/guide.html

Pour lancer le serveur il faut juste ouvrir une invite de commande et se déplacer jusqu'au dossier "REST"
cd C:/URLjuquaudossierduprojet/server/REST

A cette emplacement il faut faire la commande :
node runServer.js

La ligne suivante devrait s'afficher :
Server running at http://127.0.0.10:3000

A ce stade le serveur REST est démarré.

Vous pouvez tester votre serveur REST avec RESTClient par exemple sur firefox : https://addons.mozilla.org/fr/firefox/addon/restclient/

Exemple de commande à lancer : [Get] http://127.0.0.10:3000/test

Step 4 Run client side :

Du coté client, un exemple pour appeler le serveur avec les librairies que nous devons utiliser dans ce projet a été mis en place. Il se décompose en dossiers :

  • CSS : Contient les CSS du site. (Bootstrap).
  • js: Contient le fichier index.html.
  • Ressources : Contient les ressources médias.

Librairies installées :

Importantes

Secondaires

Pour lancer le client avec Aptana :

Clique droite sur client/index.html et "Run".

Sur XAMPP :

Lancer le serveur Apache et mettre comme URL: http://127.0.0.1/OSFGamificationProject/client/Frontend/index.html

L'exemple affiche les résultats des appelles avec jquery vers le serveur REST et un petit exemple avec ember & handlebars . Le tout se trouve dans le fichier index.html et em.js. Je vous laisse regarder...

Clone this wiki locally