Coder Social home page Coder Social logo

javiereguiluz / symfony-flex-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tarlepp/symfony-flex-backend

0.0 2.0 1.0 7.13 MB

Symfony Flex REST API template project

License: MIT License

Makefile 0.72% PHP 98.80% HTML 0.07% Shell 0.22% Dockerfile 0.13% Smarty 0.07%

symfony-flex-backend's Introduction

What is this?

MIT licensed CI Coverage Status Psalm coverage Scrutinizer Code Quality Code Intelligence Status Maintainability Sonarcloud Quality Gate Sonarcloud Vulnerabilities Sonarcloud Vulnerabilities Sonarcloud Vulnerabilities SymfonyInsight

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.

Table of Contents

Requirements

Recommendations

  • *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.

Installation

This installation guide expects that you're using docker-compose.

1. Clone repository

Use your favorite IDE and get checkout from GitHub or just use following command

git clone https://github.com/tarlepp/symfony-flex-backend.git

2. Start containers

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)

3. Using 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

4. Getting shell to container

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.

5. Building containers

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

Frontend?

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?

Resources

External links / resources

Authors

License

The MIT License (MIT)

Copyright © 2020 Tarmo Leppänen

symfony-flex-backend's People

Contributors

aleksikarhunen avatar antja0 avatar dependabot-preview[bot] avatar scrutinizer-auto-fixer avatar tarlepp avatar tarvainen avatar

Watchers

 avatar  avatar

Forkers

nchamsi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.