Skip to content

Commit dbf3ccb

Browse files
committed
guachi env : adaptando a uso en env para el script de server sample
* reducido el env, uso de puerto y direccion * ajuste de ini file, configuracion por defecto para iniciado * ajuste server sample uso de authbind para usar el puerto especifico * ajuste server sample uso de variables de entorno
1 parent 761ca8d commit dbf3ccb

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

.env

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
APP_NAME=receiptsapi
2+
APP_ENV=local
3+
APP_KEY=base64:W4HlzB4yC64SR5IMIGcdAYx0wOEM/fO3sEY427eF2aw=
4+
APP_DEBUG=true
5+
APP_URL=localhost
6+
APP_HOST=127.0.0.1
7+
APP_PORT=80
8+
9+
LOG_CHANNEL=stack
10+
LOG_DEPRECATIONS_CHANNEL=null
11+
LOG_LEVEL=debug
12+
13+
DB_CONNECTION=mysql
14+
DB_HOST=127.0.0.1
15+
DB_PORT=3306
16+
DB_DATABASE=recibosapi
17+
DB_USERNAME=access
18+
DB_PASSWORD=access
19+

guachi.ini

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,21 @@ start_module = ''
2222
[site]
2323
;sin uso para sitios privados
2424
siteName = 'Receipt Api'
25+
; TODO checquear si necesit rewrite e index php
2526
site_url = ''
2627

2728
[locale]
2829
default_date_timezone = 'America/Caracas'
2930
locale = 'es_ES.UTF-8'
3031
locale_money = 'es_VE'
32+
; TODO use enum y autodetectar segun cliente
3133
months_of_year = 'enero|febrero|marzo|abril|mayo|junio|julio|augosto|septiembre|octubre|noviembre|diciembre'
3234
days_of_week = 'lunes|martes|miercoles|jueves|viernes|sabado|domingo'
3335

3436
[datetime]
35-
date_format = 'd/m/Y'
36-
date_time_format = 'd/m/Y h:i:s A'
37-
time_format = 'h:i A'
37+
date_format = 'Ymd'
38+
date_time_format = 'YmdHis'
39+
time_format = 'His'
3840

3941
[production]
4042
production = Off

server-sample

+8-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
# in controlled environments. It is not intended to be a full-featured web server.
1515
# It should not be used on a public network.
1616

17+
. ./.env
1718

18-
PORT=8080
19-
HOST="localhost"
19+
if [ -s env ]; then
20+
. env
21+
fi
2022

21-
env php -S ${HOST} -S ${HOST}:${PORT} -t public
23+
# to run this must be `authbind --deep ./server-sample`
24+
# previously do instalation of authbind and chown the owner by user that run of /etc/authbind/byport/$APP_PORT}
25+
26+
env php -S ${APP_HOST} -S ${APP_HOST}:${APP_PORT} -t public

0 commit comments

Comments
 (0)