Skip to content

Instantly share code, notes, and snippets.

@miguelbalparda
Last active July 8, 2020 17:30
Show Gist options
  • Save miguelbalparda/3ef22403edd6410eeba33d7a6eac9d80 to your computer and use it in GitHub Desktop.
Save miguelbalparda/3ef22403edd6410eeba33d7a6eac9d80 to your computer and use it in GitHub Desktop.
Carpoolear local dev env
git clone https://github.com/STS-Rosario/carpoolear_backend.git
Create vhost www.carpoolear-dev.com.ar pointing to carpoolear_backend/public
Add AllowOverride All between </Directory> inside the created vhost
Point www.carpoolear-dev.com.ar to 127.0.0.1 in hosts file.
composer install
cp .env.example .env
Change DB credentials
Change MAIL_DRIVER=smtp to MAIL_DRIVER=log for local development
chmod -R ugo+rw storage/
php artisan key:generate
php artisan migrate
git clone https://github.com/STS-Rosario/carpoolear.git
npm install
Edit dev.env.js and prod.env.js and change the api endpoint to the local domain.
cd cordova && cordova platform add android
cordova build browser --release
Symlink resulting dir (carpoolear/cordova/platforms/browser/www/) to carpoolear_backend/app
@miguelbalparda
Copy link
Author

Response for /api/users was 404. Adding AllowOverride All and enabling mod_rewrite fixed this.

@miguelbalparda
Copy link
Author

Creating users was not working. The error was a timeout while trying to connect to mailtrap.io. Changing the driver to log allowed me to see the emails inside carpoolear_backend/storage/logs/ i.e to activate the account.

@miguelbalparda
Copy link
Author

miguelbalparda commented Aug 3, 2018

michael@michael-HP-Laptop-15-bs0xx:~/carpoolear$ php -v
PHP 7.1.17-0ubuntu0.17.10.1 (cli) (built: May  9 2018 17:28:01) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.17-0ubuntu0.17.10.1, Copyright (c) 1999-2018, by Zend Technologies
michael@michael-HP-Laptop-15-bs0xx:~/carpoolear$ php -m
[PHP Modules]
calendar
Core
ctype
date
dom
exif
fileinfo
filter
ftp
gettext
hash
iconv
imagick
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib

[Zend Modules]
Zend OPcache

@miguelbalparda
Copy link
Author

michael@michael-HP-Laptop-15-bs0xx:~/carpoolear$ mysql -V
mysql  Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using  EditLine wrapper
michael@michael-HP-Laptop-15-bs0xx:~/carpoolear$ apache2 -v
Server version: Apache/2.4.27 (Ubuntu)
Server built:   2018-04-18T14:20:05

@00xkhaled
Copy link

00xkhaled commented Jul 12, 2019

when i put the directory to /var/www/carpoolear_backend/public the website and API works not the app and when i point it to /var/www/carpoolear_backend/app the /app work but the normal API and web app don't work any suggestions?

@miguelbalparda
Copy link
Author

miguelbalparda commented Jul 12, 2019

I think you are missing a step, probably this one.

@raditha
Copy link

raditha commented Jul 8, 2020

Do you have any pointers when enabling https for the app. I am getting /api/trips 404 when accessing over https. I have a self signed certificate configured and the app is running on apache2 in ubuntu 18 env.

EDIT- http works without any issue.

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