Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Setting up a working development environment

Anıl Uygun edited this page Nov 4, 2017 · 3 revisions

.env

There is an env.example file included in the repo that contains all the necessary configs for your vagrants: https://github.com/Muhit-co/api/blob/master/.env.example

  • Copy the example env file to env: cp .env.example .env

vagrant setup

  • in the api directory, type vagrant up
  • ssh into the vagrant machine with vagrant ssh
  • type cd muhit inside this machine to switch to the muhit directory
  • type composer install to install all the requirements
  • type php artisan migrate to run the latest database migrations.

errors

  • If you get any composer errors regarding some timeout because of npm install, you can run npm install and then composer install. This might happen depending on your connection speed during the first time. Once you get all the npm and composer dependencies you should be good to go for future updates.
  • If you get Bad gateway error when you try to connect muhit.api after installation you can check answer in this post : https://laracasts.com/discuss/channels/general-discussion/502-bad-gateway-nginx-197-in-homestead-laravel-5
    • run command : sudo nano /etc/nginx/sites-enabled/homestead.app
    • update fastcgi_pass line to this: fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    • run commands:
      • sudo service nginx restart
      • sudo service php7.0-fpm reload

dev database

The seeder sql file should contain couple of users and issues.