Download the PHP package neoan.io/rest-api-starter-project without Composer

On this page you can find all versions of the php package neoan.io/rest-api-starter-project. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rest-api-starter-project

Basic neoan.io Lenkrad REST-API starter kit with authentication

This is a very light project setup designed to get your REST-api up and running in no time.

Requirements

Installation

composer create-project neoan.io/rest-api-starter-project my-app

cd my-app

composer update

php install

To run: php dev

The, visit http://127.0.0.1:8080

Basic tutorial

This project ships with a basic tutorial to get you started. For deeper understanding, please visit the lenkrad docs: neoan.io lenkrad

Authentication

After installation, you can register a user against POST /api/auth/register (src/Auth/Api/Register.php) with a payload containing email and password:

curl -X POST -H "Content-Type: application/json" -d '{"email": "[email protected]", "password": "123456"}' http://127.0.0.1:8080/api/auth/register

Authenticated calls will require the provided JWT-token

The login endpoint is /api/auth/authenticate (src/Auth/Api/Authenticate.php) and the endpoint /api/auth/me (src/Auth/Api/Me.php) returns the current user.

Restricting routes

Middleware can be chained prior to routes in the respective Attributes (see src/Auth/Api/ME.php for clarification)

Understanding the capabilities

The folder src/Example should give you a good starting point for intuitive understanding of how the LENKRAD core is used in this starter. Be aware that you are completely free regarding structure. What you find in this starter is a mere example.

Security / Before you deploy

Your checklist:

Change from SQLite to MySQL or MariaDB

First, add the following information to your .env file

Make sure that the selected database is created. Then, change the constructor of config/Database.php to use the method useMySql instead of useSQLite.

When migrating, use the dialect keyword mysql instead of sqlite:

php cli migrate:models mysql


All versions of rest-api-starter-project with dependencies

PHP Build Version
Package Version
Requires neoan.io/core Version ^0
neoan.io/legacy-db-adapter Version 1.*
neoan3-apps/stateless Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package neoan.io/rest-api-starter-project contains the following files

Loading the files please wait ...