Environment Configuration

This part of the document provides you with the Environmental file configuration required in API code of Spurtcommerce.

Mail Configuration

For mail configuration, you need to set up your SMTP credential in the .env file in api code

#
# Mail
#

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com 
MAIL_USERNAME="[email protected]"    #--Your Email Id
MAIL_PASSWORD= "spurt123&"           #--Your Email Password 
MAIL_PORT=465
MAIL_SECURE=true
MAIL_ENCRYPTION=tls
MAIL_FROM="[email protected]"

Environment Variables

Database Configuration

we are using MySQL database, we need to configure database credentials in the .env file

JWT Configuration

Here are some scenarios where JSON Web Tokens are useful:

  • In your API code, Locate .env file and include a config variable "JWT_SECRET" (if not present already) and set a random string as config value (e.g:2345@#$%678$%^&*abndutyth89?)()#$@&naagw) for this variable.

JWT token for authorization will be created with help of this secret key.

Crypto Configuration

Here we are using crypto for encrypting and decrypting of the JWT token

For S3 storage

set your aws S3 credential in .env and .env production file

set the below urls in .env file.

Last updated