aura/blog

Aura blog example

2.0.0-alpha1 2014-11-18 07:48 UTC

This package is auto-updated.

Last update: 2024-12-07 21:06:12 UTC


README

Aura version 2 blog example using the Action Domain Responder.

Installation

composer create-project -s dev aura/web-project aurav2
cd aurav2
composer require "aura/blog:2.0.*@dev"

Create a database and run the code.

SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

DROP TABLE IF EXISTS `blog`;
CREATE TABLE `blog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `intro` tinytext NOT NULL,
  `body` text NOT NULL,
  `author` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Edit config/Common.php and in define() method we need to define the database connection as below.

$di->params['Aura\Sql\ExtendedPdo'] = array(
    'dsn' => 'mysql:dbname=auraauth;host=127.0.0.1',
    'username' => 'root',
    'password' => 'mysqlroot'
);

Change the username and password according to yours.

Run your local php server

php -S localhost:8000 web/index.php

And browse http://localhost:8000/blog