Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.

Commit 9e820b4

Browse files
committed
add headers options to email sending
1 parent 0a538bb commit 9e820b4

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Diff for: README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,16 @@ Mailer.send(
173173

174174
Simple as a pie!
175175

176-
#### Important note regarding template paths
177-
178-
**tldr;** Set the `BUNDLE_PATH` environment variable to the absolute path to your Meteor app bundle directory.
176+
### Template paths on deployed instances
179177

180178
This package assumes that assets (templates, SCSS, CSS ..) are stored in the `private` directory. Thanks to that, Meteor won't touch the HTML and CSS, which are non-JS files. Unfortunately, Meteor packages can't access content in `private` with the `Assets.getText()` method, so we need the *absolute path* to the template directory.
181179

182-
However, since the file paths are screwed up when bundling and deploying Meteor apps, we need to set the `BUNDLE_PATH` env var to keep track of where the bundle lives. When deployed, set the `BUNDLE_PATH` env var to the location, perhaps:
180+
However, file paths are screwed up when bundling and deploying Meteor apps. Therefore, when running a deployed instance, **one of the following variables must return the absolute path to the bundle:**
183181

184-
```
185-
/var/www/app/bundle
186-
```
182+
1. For traditional hosts, manually set the `BUNDLE_PATH` environment variable. For instance `/var/www/app/bundle`.
183+
2. For deployments on hosts with ephemeral file systems like Modulus, the `APP_DIR` environment variable should be provided by host. In that case, `APP_DIR` is used instead.
184+
185+
In development, neither of `BUNDLE_PATH` and `APP_DIR` are needed.
187186

188187
### Template Helpers
189188

Diff for: utils.coffee

+4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ sass = Npm.require 'node-sass'
1414
#
1515
# When deployed, set the BUNDLE_PATH env var to the location, perhaps:
1616
# /var/www/app/bundle
17+
# For Modulus, you need to use the APP_DIR variable, which you do NOT need to set
18+
1719
if process.env.BUNDLE_PATH
1820
ROOT = path.join(process.env.BUNDLE_PATH, 'programs', 'server', 'assets', 'app')
21+
else if process.env.APP_DIR
22+
ROOT = path.join(process.env.APP_DIR, 'programs','server', 'assets', 'app')
1923
else
2024
# In development, using PWD is fine.
2125
ROOT = path.join(process.env.PWD, 'private')

0 commit comments

Comments
 (0)