Ldfcorp website
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
src
web
.gitignore
.travis.yml
LICENSE
README.md
composer.json
composer.lock
package.json
server.js

README.md

Readme

This is the Ldfcorp website, here it will be explained how to install it.

Installation

First of all you need this some programs

Now you can install this project based on Symfony 2.8.x

Initialize project

  • Get the project git clone <repository-url>
  • Install node modules npm install
  • Install forever as root user sudo npm install forever -g
  • Launch server.js forever start server.js
  • Install composer at the root of your peoject curl -s http://getcomposer.org/installer | php
  • Use this command and answer configuration questions php composer.phar install
    • For database, you should create a database with one user who can only access this base
    • For node_client, you should use your server hostname node_client: http://my.host.org:8000
  • Check if your php config is correct php app/check.php
  • Create the database php app/console doctrine:schema:update --force
  • Populate the database with this script php app/console ldfcorp:populate
  • Add the nginx or your favorite web server symfony 2 configuration
  • Create an admin user (replace adminuser by login you want) php app/console fos:user:create adminuser --super-admin
  • Clear your prod cache php app/console cache:clear --env=prod

Now you can view the project on your favorite browser

Technical informations

This project use symfony2 framework because of the his good project architecture. We use Doctrine for entities, Symfony Form Types for forms using entities, Symfony Controllers to link Entities and Twig views or HttpFoundation Responses.

To purpose dynamic content, we use socket.io from node.js because this component can notify the web browser.

To link node.js and symfony2, we use elephant.io component because it's a PHP socket.io implementation.

We use node.js server on two ports, one listening symfony2 and one listening web browser client :

  1. Web browser send a request to symfony2
  2. symfony2 notify node.js through elephant.io_
  3. node.js push notification to the Web browser