If you follow the following steps, your instance will run on localhost
Ask for SMTP settings and fill your .env file
OR you can use mailhog for testing purposes, like this:
Install:
brew install mailhogRun:
brew services run mailhogNote: Web UI: http://localhost:8025/
Mailhog dev settings:
SMTP_HOST='localhost'
SMTP_PORT=1025
SMTP_PASSWWORD=''
EMAIL_FROM='noreply@invisibleurl.net'
go test ./...At localhost, you don't need a certificate. On the production environment, there will be NGinX that handles SSL. Be careful, there is a chance that you will have to fight with your browser on local dev setup to be able to reach the site without SSL. Or, if you want, you can still set up NGinX locally as well and generate a certificate for yourself:
Generate certificate:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 36500 -nodesNote: use localhost as fqdn Note: your browser won't like that certificate. You have to add it to your browser's certificate store manually.
Install:
go install github.com/air-verse/air@latestRun:
air .