Git Product home page Git Product logo

bourses-front-office's Introduction

Bourses Front Office


Installation

Arborescence

L'arborescence doit être la suivante :

/var/www/html/bourses : - api (repository bourses-api) : - front-office (repository bourses-front-office) : - google-api (pas encore de repository)

Clonage

Lancer la commande suivante :

$ git clone https://github.com/maximebourdel/bourses-front-office.git

Installation de npm, node et ng

Cette commande permet d'installer npm puis ng

$ apt-get install npm
$ apt-get install ng-common
$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
$ apt-get install -y nodejs
$ npm install -g @angular/cli

Installation des composants

$ npm isntall

Vérification :

$ npm -v
$ node -v
$ ng -v

La commande pour ng -v doit ressembler à ceci :

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.0.0-rc.1
node: 6.10.0
os: linux x64
@angular/common: 2.4.9
@angular/compiler: 2.4.9
@angular/core: 2.4.9
@angular/forms: 2.4.9
@angular/http: 2.4.9
@angular/platform-browser: 2.4.9
@angular/platform-browser-dynamic: 2.4.9
@angular/router: 3.4.9
@angular/cli: 1.0.0-rc.1
@angular/compiler-cli: 2.4.9

Modification de l'API Industry

Accéder au répertoire suivant /bourses/front-office/src/app/yahoo/finance/industry dans le fichier suivant industry.service.ts et modifier la variable suivante :

baseUrl = 'http://localhost:80/bourses/api/web/app_dev.php/';

En suivant :

baseUrl = 'http://bourses-online.com/api/app_dev.php/';

Compiler le résultat

Afin de compiler le projet, lancer la commande suivante :

$ ng build --prod

Qui va créer un répertoire dist qui contiendra tout le code du projet compilé.

Configurer apache2

Dans le répertoire /etc/apache2 dans le fichier apache2.conf , et ajouter à la fin du fichier :

<VirtualHost *:80>

    ServerName bourses-online.com
    ServerAlias www.bourses-online.com

    Alias /api /var/www/html/bourses/api/web

    DocumentRoot /var/www/html/bourses/front-office/dist

    <Directory /var/www/html/bourses/front-office/dist>
        AllowOverride None
        Order Allow,Deny
        Allow from All

        RewriteEngine on

        # Don't rewrite files or directories
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^ - [L]

        # Rewrite everything else to index.html
        # to allow html5 state links
        RewriteRule ^ index.html [L]


    </Directory>

</VirtualHost>

Redémarrer ensuite apache et son composant a2enmod :

$ sudo a2enmod rewrite
$ sudo service apache2 restart

Installation de Google API Analytics

Modification de l'API Industry

Accéder au répertoire suivant /bourses/front-office/src/app/google/analytics dans le fichier suivant api.service.ts et modifier la variable suivante :

let url: string = 'http://localhost:8081/bourses/google-analytics';

En suivant :

let url: string = 'http://5.39.77.232:8081/bourses/google-analytics';

Après avoir importé le projet google-api lancer la commande suivante :

$ nohup node /var/www/html/bourses/google-api/server.js &

bourses-front-office's People

Contributors

angular-cli avatar maximebourdel avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.