[Plugin] pawn env - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Releases (https://forum.open.mp/forumdisplay.php?fid=13) ---- Forum: Plugins (https://forum.open.mp/forumdisplay.php?fid=32) ---- Thread: [Plugin] pawn env (/showthread.php?tid=552) |
pawn env - dakyskye - 2019-05-12 pawn-env Access environment variables in PAWN Installation Install to your project: Code: sampctl package install dakyskye/pawn-env include in your code: Code: #include <env> and start using it. Usage At development time, you can use .env file, but in production it?s not recommended. Example .env file content: Code: MYSQL_USER=user Using it in the recommended way: Code: MYSQL_USER=user MYSQL_PASSWORD=password MYSQL_HOST=localhost MYSQL_DATABASE=database sampctl package run Code: $env:MYSQL_USER="user"; $env:MYSQL_PASSWORD="password"; $env:MYSQL_HOST="localhost"; $env:MYSQL_DATABASE="database"; sampctl package run Code: docker run -d \ API Code: native bool:Env_Has(const env[]);
Example usage can be found in tests/tests.pwn Building First of all, install GNU Make if you haven?t already. Code: make build Code: docker build -t pawn-env . An example path from my case: X:\My-Workflow\pawn-env\plugins Credits
RE: pawn env - javelin - 2019-12-13 useful as always, thank you daky RE: pawn env - dakyskye - 2019-12-14 (2019-12-13, 05:43 PM)javelin Wrote: useful as always, thank you daky Glad to hear |