Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/luracast/restler-application

Application boilerplates for Restler. Each branch contains a flavor, find the one that suits you.
https://github.com/luracast/restler-application

database-support php restler restler-application

Last synced: 3 months ago
JSON representation

Application boilerplates for Restler. Each branch contains a flavor, find the one that suits you.

Awesome Lists containing this project

README

        

![Restler](https://github.com/Luracast/Restler/raw/master/public/examples/resources/restler.svg)

Basic Restler Application
=========================

Minimalistic api server boilerplate for [Luracast Restler](https://github.com/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](http://getcomposer.org/) 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](https://getcomposer.org/doc/00-intro.md#system-requirements)

### 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](https://github.com/Luracast/Restler-Application/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

```json
{
"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