git clone https://github.com/mindaugasvcs/symfony-rest-api.git
composer install
To setup on production server:
- Create "real" DATABASE_URL environment variable. How you set environment variables, depends on your setup: they can be set at the command line, in your Nginx configuration, or via other methods provided by your hosting service;
- Or, create a .env.local file like your local development.
To setup on dev environment edit .env and .env.local (for local overrides) files to suit your database server configuration.
php bin/console doctrine:database:create
For more details see: http://symfony.com/doc/current/book/doctrine.html#configuring-the-database
php bin/console doctrine:migrations:migrate
The command will create empty database tables based on entities.
php bin/console doctrine:fixtures:load
Regenerate APP_SECRET variable:
php -r "echo bin2hex(random_bytes(16));"
Change to production environment:
APP_ENV=prod
APP_DEBUG=0
Clear and warm-up Symfony cache:
php bin/console cache:clear
Issue GET request to {your host}/api/products/recommended/{city name}
php bin/console debug:router
php vendor/bin/phpunit
You must inform users of this service that it uses data provided by LHMT.
For more details see: https://api.meteo.lt