承接 restler/application 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

restler/application

Composer 安装命令:

composer require restler/application

包简介

Application boiler-plate for Luracast Restler, an api first micro framework

README 文档

README

Restler

Basic Restler Application

Minimalistic api server boilerplate for Luracast Restler

Restler is an api first microframework that offers better web api by design. Every branch in this repository contains different application templates to suit your needs.

Basic App provides the bare minimum to get started with restler development

Installation

Make sure PHP 5.5 or above (use the latest version of PHP for better performance) is available on your server

Composer is used to manage the dependencies. If you don't already have composer installed, we recommend installing it globally

Install Composer

Instructions to install composer globally are available in getcomposer.org

Install Basic Restler Application

You can run the following command on your terminal window to install the app

composer create-project restler/application=dev-basic {app_name}

Replace {app_name} with the name of your application.

It will create a new folder and place all the needed files to get started.

Alternatively, since this is a template repository, you can simply generate your own repository from it!

What's in it?

Basic is a minimalistic app templates for api development. It has a sample api class called Home that has the following success message for the api root.

It is advisable to use namespace for the api classes for avoiding name conflicts, here we are using App as the namespace

{
  "success": {
    "code": 200,
    "message": "Restler is up and running!"
  }
}

On your development machine, you can run the development server by running the composer serve on the project root. This will run the php development server at port 8000 on localhost by default. If you need to run change that you can edit your composer.json accordingly.

This project also comes with swagger ui for testing and documenting the api. You can access that using the following url

http://localhost:8000/explorer

Next Steps

There is only public api, you may want to add an auth class and add some protected api

统计信息

  • 总下载量: 305
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.1-or-later
  • 更新时间: 2015-03-26