Skip to content

API to serve data for itrade-dongs.

License

Notifications You must be signed in to change notification settings

lfsc09/itrade-api

Repository files navigation

Static Badge Static Badge Static Badge Static Badge

Generate config file for Slim

Generate the config.php from config.example.php:

putenv('DISPLAY_ERRORS_DETAILS='. TRUE);

putenv('DB_HOSTNAME=localhost');
putenv('DB_PORT=3306');
putenv('DB_USER=root');
putenv('DB_PASS=%PASSWORD%');
putenv('DB_NAME=u631028490_iTrade');

putenv('JWT_SECRET_KEY=%ENCRYPTION_KEY_512%');
putenv('JWT_SECURE=' . TRUE);

Deploy

It uses (https://github.com/TrafeX/docker-php-nginx) docker image for PHP-fpm with Nginx.

docker compose up -d

Local Testing

In Windows

https://stackoverflow.com/questions/8652948/using-port-number-in-windows-host-file

Setting up the api url dns, for locally testing with front-end.

In the hosts file of Windows.

127.x.x.x api.itrade-dongs.com.br
netsh interface portproxy add v4tov4 listenport=80 listenaddress=127.x.x.x connectport=8001 connectaddress=192.168.0.4

You can test the choosen local IPv4 address with

netstat -a -n -p TCP | grep "LISTENING"

Show the proxy maps with

netsh interface portproxy show v4tov4

About

API to serve data for itrade-dongs.

https://api.itrade-dongs.com.br (Down)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published