damijanc/rest-client-demo

1.0 2017-01-06 15:51 UTC

This package is auto-updated.

Last update: 2024-09-10 04:59:08 UTC


README

![Travis状态] (https://travis-ci.org/damijanc/rest-client-demo.svg?branch=master)

simple-rest

使用Symfony 3、Doctrine和MariaDB的示例REST服务

安装

  • 在项目根目录下运行 composer install
  • 设置数据库 mysql -u root < ./Model/generation.sql

如何运行

  • 您可以通过运行 php bin/console server:run 来使用内置的php服务器运行服务器

测试

要运行测试,请在项目根目录下运行 ./vendor/bin/phpunit

模拟API运行器

  • 为了运行您可以用来自测试的模拟API,您需要安装nodejs。然后运行
npm install
npm run-script run

您的模拟API将在 http://127.0.0.1:3030/api/ 上可用。有关详细信息,请检查RAML。