Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
heyanlong committed Apr 11, 2019
0 parents commit 94aa38b
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
25 changes: 25 additions & 0 deletions composer.json
@@ -0,0 +1,25 @@
{
"name": "kaiyuan-finance/vanilla",
"description": "",
"type": "project",
"require": {
"php": ">=7.1.3",
"kaiyuan-finance/vanilla-framework": "^1.0.0"
},
"autoload": {
"files": [
"app/helpers.php"
],
"psr-4": {
"App\\": "app/",
"Tests\\": "tests/"
}
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
17 changes: 17 additions & 0 deletions config/cache.php
@@ -0,0 +1,17 @@
<?php
/**
* Created by PhpStorm.
* User: heyanlong
* Date: 2018/7/31
* Time: 上午10:26
*/
return [
'type' => 'redis',
'redis' => [
'host' => env('REDIS_URI', 'tcp://127.0.0.1:26379?timeout=1'),
'type' => 'sentinel',
'service' => env('REDIS_NAME', 'mymaster'),
'password' => env('REDIS_PASSWORD',''),
'prefix' => 'vanilla'
]
];
12 changes: 12 additions & 0 deletions config/db.php
@@ -0,0 +1,12 @@
<?php

return [
'default' => [
'host' => env('DB_HOST', '127.0.0.1'),
'database' => env('DB_DATABASE', ''),
'port' => env('DB_PORT', '3306'),
'username' => env('DB_USERNAME', ''),
'password' => env('DB_PASSWORD', ''),
'commands' => 'SET autocommit=ON,SET NAMES utf8mb4'
]
];
7 changes: 7 additions & 0 deletions public/index.php
@@ -0,0 +1,7 @@
<?php
require __DIR__ . '/../vendor/autoload.php';

\Vanilla\Config\Environment::load("/you/redis/map");
$app = new \Vanilla\Application(dirname(__DIR__));
$response = $app->run();
$response->send();
4 changes: 4 additions & 0 deletions routes/web.php
@@ -0,0 +1,4 @@
/**
* @var $r \FastRoute\RouteCollector
*/
$r->get('/', [])

0 comments on commit 94aa38b

Please sign in to comment.