Skip to content

esac-ic/esac.nl

Repository files navigation

Build Status

Framework/libaries

The following libaries and framework are used:

Setting up steps

Create an .env file from .env.example, with your local values for DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD Note: When running your local environment on a certain port, let's say 3000, modify your APP_URL in the file to reflect that port, else the api's won't work

Development environment (Windows)

  1. you need the following programs to run the code on your local environment:

  2. Clone the project repository

    git clone https://github.com/esac-ic/esac.nl.git
    
  3. Create an .env file from .env.example, with your local values for DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD Note: When running your local environment on a certain port, let's say 3000, modify your APP_URL in the file to reflect that port, else the api's won't work

  4. Make sure you've enabled the following extensions in your php.ini file, this can be found next to the php.exe location

    extension=fileinfo
    extension=gd
    extension=pdo_mysql
    
  5. Execute the following commands from the repository root

    composer install
    php artisan migrate
    php artisan db:seed
    php artisan key:generate
    php artisan storage:link
    npm install
    npm run dev
    

    When you make changes to CSS or JS file you need to build again which can be done with

    npm run dev
    

    It is also possible to recompile your files when you make a change by running the following command

    npm run watch
    

Production environment

When you update the server make sure you run the following commands

php artisan migrate
npm run production