Skip to content

Repository files navigation

Tinycoaching Backend

Getting Started

  • Pull the project
  • Generate key pair and put them on /config/jwt
  • update .env variables (see .env below)
  • Run
composer install
  • Then run
symfony server:start

Environment variables

DATABASE_USER=root
DATABASE_PWD=root
DATABASE_HOST=127.0.0.1
DATABASE_PORT=3306
DATABASE_NAME=tc_backend_prod
DATABASE_URL=mysql://${DATABASE_USER}:${DATABASE_PWD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}

FO_HOST=http://localhost:4224

TINYDATA_HOST=http://localhost:4200
TINYDATA_TOKEN=Un Token

IA_URL=l'URL du service IA
IA_API_SCHEME=http:// ou https://
IA_API_PORT=le port sur service web IA
IA_API_TOKEN=Un Token


JWT_PRIVATE_KEY_PATH=config/jwt/private.pem
JWT_PUBLIC_KEY_PATH=config/jwt/public.pem
JWT_PASSPHRASE=tinyjwt

DEFAULT_QUOTE_MATRIXES=82

Manage database

Migration and execution for updating Tinycoaching's database

php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate

Troubleshooting

  • You may have a problem with the symfony server, try to run
symfony server:stop
symfony server:start

Toolbox and tips

  • If you want to encrypt user password for making test or something else, you can run
php bin/console security:encode-password 'THE PASSWORD' 'App\Entity\User'
  • If you want to debug the GraphQL API, you won't be able to directly dump and die in the frontend because of the CORS headers. It's better to use Postman for debuging the API.

  • Generate missing getters and setters for Entities

php bin/console make:entity --regenerate App

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages