JSON REST API which is build on top of Symfony framework.
This application is mean to use as an API
that some frontend
application(s) or different backend application(s) uses as they like.
- docker-compose
- If you are not using docker / docker-compose then follow this
*nix platform
- most likely you're going to host your application on *nix platform - so I would recommend to do development also on that platform.Makefile
support - if you don't have this you need to lookMakefile
file to see what eachmake
command is doing.
This installation guide expects that you're using docker-compose.
Use your favorite IDE and get checkout from GitHub or just use following command
git clone https://github.com/tarlepp/symfony-flex-backend.git
For this just run following command:
make start
This command will create three (3) containers to run this backend application. Those containers are following:
- php (this is for actual application)
- nginx (this will serve application)
- mysql (MySQL 5.7 which will store all the data of application)
By default make start
/ docker-compose up
command starts those three
containers and exposes following ports on localhost
:
- 8000 (nginx + php-fpm)
- 3310 (mysql)
And this application is usable within your browser on http://localhost:8000
address.
MySQL credentials:
user: root
password: password
After you've run make start
/ docker-compose up
command you can list all
running containers with docker ps
command.
And to eg. get shell access inside one of those containers you can run following command:
make bash
Where that php
is that actual container where this backend application is
running.
For time to time you probably need to build containers again. This is something that you should do everytime if you have some problems to get containers up and running. This you can do with following command:
make start-build
So this is an API backend what about frontend then? No worries I've made simple Angular NgRx powered template frontend which work with this backend just out of the box.
Angular NgRx powered frontend template for Symfony backend
With these two template applications it should be quite easy to start to build your own application - right?
- Resource index
- Application commands
- Concepts and features
- Custom configuration
- Development guide
- Installation without docker
- PhpStorm configuration
- Speed problems with docker-compose?
- Testing guide
- Usage checklist
- Using Xdebug
- Symfony Flex set to enable RAD (Rapid Application Development)
- Symfony 4: A quick Demo
- composer-version
- Symfony Recipes Server
Copyright © 2020 Tarmo Leppänen