Skip to content

Instantly share code, notes, and snippets.

@davquipe
Last active September 8, 2022 20:28
Show Gist options
  • Save davquipe/4d6aef4cb39d784ae778d00262f77d43 to your computer and use it in GitHub Desktop.
Save davquipe/4d6aef4cb39d784ae778d00262f77d43 to your computer and use it in GitHub Desktop.
Development environment setup Conssigue Ventas :)

Setup for development of Cons.. Ventas

React repo1. Backend setup2.

Clonamos el repositorio de GitHub:

git clone https://github.com/ConsigueVentas/consigueventas_comercial_frontend.git

Branch dev.

git clone --single-branch -b dev https://github.com/ConsigueVentas/consigueventas_comercial_frontend.git
cd consigueventas_comercial_frontend
  • Puedes ver las rama en la que te encuentras en cada instante con el comando: git branch.
  • Para cambiar de rama git checkout dev, mas info click aqui.

He instalamos los paquetes de node

npm install

Levantamos nuestro entorno

npm run start o yarn start

Configuración e instalaciion del Backend y DataBase

Instalacion de PHP

For Mac and Linux con brew

brew install php
  • Version details
which php

For Windows PHP

Install Composer

comandos que encontre en su propia pagina de composer.

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Verificamos

composer --version

Composer version 2.3.7 2022-06-06 16:43:28

Ejecuar este script o query. mysql workbench

Un script como el de abajo: de la rama developmet

drop database if exists dbdepcomercial;
create database dbdepcomercial;
use dbdepcomercial;
set sql_mode=PIPES_AS_CONCAT;
.
.
.
.
  • Y se crea una base de datos localmente llamada dbdepcomercial

laravel-backend

Laravel backend (Laravel ^7.0)

Installation

  1. git clone https://github.com/ConsigueVentas/consigueventas_comercial_backend.git
  2. cd consigueventas_comercial_backend
  3. git checkout development
  4. o directo git clone --single-branch -b development https://github.com/ConsigueVentas/consigueventas_comercial_backend.git
  5. cambiar nombre .env.example a .env.
  6. composer install
  7. npm install (do not run in docker container)
  8. edit database in .env file
    APP_URL=YOUR_APP_URL
    .
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=laravel
    DB_USERNAME=root
    DB_PASSWORD=
    
  9. php artisan key:generate
  10.  php artisan migrate:fresh --seed
     or 
     php artisan migrate
     php artisan db:seed
    
  11. php artisan storage:link
  12. php artisan serve

@davquipe 👍 This gist looks great, it's ready to use! 🤙

Branchs Front

Here is a simple flow chart:

graph TD;
    MAIN-->DEV;
    MAIN-->LEE;
Loading

Branchs Backend

Here is a simple flow chart:

graph TD;
    MAIN-->DEVEVELOPMENT;
    MAIN-->CHAVEZ;
    MAIN-->TEMPORAL;
Loading
  1. step1 composer require tymon/jwt-auth --ignore-platform-reqs
  2. step2 php artisan jwt:secret
  3. step3 php artisan serve

Footnotes

  1. React

  2. Backend Start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment