Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Increase information
  • Loading branch information
yulonghu authored May 8, 2018
1 parent 90df6e4 commit 4dc4a79
Showing 1 changed file with 58 additions and 10 deletions.
68 changes: 58 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,75 @@
# Asf - API Services Framework
# Asf - API Services Framework
[![Build Status](https://travis-ci.org/yulonghu/asf.svg?branch=master)](https://travis-ci.org/yulonghu/asf)

This is a PHP framework written in C. It is simple, fast, standards, security.

## Install

### Requirements
- PHP 7.0 +
- GCC 4.4.0+ (Recommended GCC 4.8+)

### DownLoad

```
git clone https://github.com/yulonghu/asf.git
```

### Linux/Unix/Mac

### Compile for Linux/Unix/Mac
```
$ /path/to/phpize
$ ./configure --with-php-config=/path/to/php-config
$ make && make install
```
## Documentation
### Documentation

### Need Help
http://www.box3.cn/phpasf/index.html

### Start with the Hello Wrold
## Get Started

### Use tools to create a new project
```
/path/asf/tools/asf_project project_name
```
#### Layout
```
+ public
| - index.php
+ config
| - config.php
+ library
+ modules
| - Bootstrap.php
| - Constants.php
+ api
|+ services
|- Index.php // Default service
|+ logics
|+ daos
```

### config/config.php
```php
<?php
$configs = array(
'asf' => array(
'root_path' => realpath(dirname(__FILE__)),
)
);

return $configs;
```

### public/index.php
```php
<?php
define('APP_PATH', dirname(__DIR__));

$app = new Asf_Application(APP_PATH . '/config/config.php');
$app->run();
```

### Default service
```php
<?php
class IndexService
{
public function indexAction()
Expand All @@ -40,7 +79,16 @@ class IndexService
}
```

## License
### Run in Nginx/Apache/Lighttpd
http://www.your-domain.com/

Asf is open source software under the [PHP License v3.01](http://www.php.net/license/3_01.txt).
#### Output results
```
{
"errno": 0,
"data": "Hello World"
}
```

## License
Asf is open source software under the [PHP License v3.01](http://www.php.net/license/3_01.txt).

0 comments on commit 4dc4a79

Please sign in to comment.