Giter Club home page Giter Club logo

symfony_blog's Introduction

Symfony Blog

This blog made as example of simple application based on Symfony 2, Doctring ODM and MongoDB.

Installation

Step 1: Install MongoDB and corresponding PHP extension

If you still don't have MongoDB installed it's time to get it. Follow this installation guide. You also have to enabled PHP extension for MongoDB. You can use this installation guide.

Step 2: Set configuration

Create file app/config/parameters.yml. You can copy it from app/config/parameters.yml.dist. Make sure that mongodb_server and mongodb_database database_paths are correct.

Also change secret parameter with other unique value.

Step 2: Get composer

Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.

To install it globally on linux use these commands:

$ curl -s https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

Step 3: Install vendors

Go to project root directory and run following command:

composer install

Configuring web server

For Apache virtual host configuration might look like that:

```
<VirtualHost *:80>
    DocumentRoot "/var/www/symfony_blog/web/" # in your environment path might differs
    ServerAdmin admin@localhost
    ServerName symfony-blog.local # in your environment server name might differs

    <Directory "/var/www/symfony_blog/web/"> # in your environment path might differs
        Options FollowSymLinks
        Options all
        AllowOverride All
    </Directory>
</VirtualHost>
```

Open URL http://symfony-blog.local/app_dev.php/ (your URL might be different). You should see blog start page.

Running tests

You need installed PHPUnit.

Create app/phpunit.xml file from app/phpunit.xml.dist. You can run all tests using command.

```
phpunit -c app/phpunit.xml
```

Enjoy!

symfony_blog's People

Contributors

ignat-s 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.