Laravel deployment on AWS Lambda using bref/serverless.
Error message:
production.ERROR: SQLSTATE[HY000] [2002] Connection refused (SQL:...
This is a database connection error but I think this is because Laravel is not reading environmental variables.
This:
Route::get('/', function () {
return env('APP_NAME');
});
returns nothing although APP_NAME is set and works properly on a local computer.
I'm not sure where the .env file is located on AWS Lambda and how to check it (other than the test above) if it is properly transferred to AWS Lambda.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2WOYDbv
via IFTTT
Aucun commentaire:
Enregistrer un commentaire