Stars: 273
Forks: 54
Pull Requests: 2358
Issues: 74
Watchers: 11
Last Updated: 2023-09-17 10:03:18
Symfony Flex REST API template project
License: MIT License
Languages: Makefile, PHP, Shell, Dockerfile, Smarty, Twig
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.
*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 look Makefile file
to see what each make 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.gitFor this just run following command, which will start all the containers:
make startIf you like to start containers in background, then you can use following command:
make daemonThese commands will create following containers to run this backend application:
By default make start / docker-compose up command starts all the containers
and exposes following ports on localhost on your host machine:
And this application is usable within your browser on https://localhost:8000
address. When you first time open that site you will see "Your connection is
not private" warning - see this to resolve that.
Another choice is to use http://localhost:8080 which is not using SSL.
MariaDB credentials:
user: root
password: passwordAfter you've run make start / docker-compose up command you can list all
running containers with docker ps command.
And to eg. get shell (bash or fish) access inside one of those containers you can run following command:
make bashOR
make fishFor 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 daemon-buildIf you like to see containers logs directly use following command:
make start-buildSo 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?
Copyright © 2021 Tarmo Leppänen