Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Readme to make it easier for starters #41

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,24 @@ Add the dependency to Package.swift:
.package(url: "https://github.com/vapor-community/sendgrid.git", from: "4.0.0")
~~~~

~~~~swift
.target(name: "App", dependencies: [
.product(name: "SendGrid", package: "sendgrid"),
.product(name: "Vapor", package: "vapor"),
]),
~~~~

Make sure `SENDGRID_API_KEY` is set in your environment. This can be set in the
Xcode scheme, or specified in your `docker-compose.yml`, or even provided as
part of a `swift run` command.

To set it in the Xcode Scheme you can click in edit scheme and it shows a list of
Environment Variables where you can create a new entry for `SENDGRID_API_KEY`.

![Xcode Scheme SendGrid API Key Environment Variables](XcodeSchemeSendGrid.png?raw=true "Xcode Scheme SendGrid API Key Environment Variables")

## Initialize

Optionally, explicitly initialize the provider (this is strongly recommended, as
otherwise a missing API key will cause a fatal error some time later in your
application):
Expand Down
Binary file added XcodeSchemeSendGrid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.