- Live demo: https://mosaicobackend-prod.herokuapp.com
- Heroku button page: https://elements.heroku.com/buttons/goodenough/mosaico-backend
Ready to go backend for Mosaico editor.
Main features are:
- upload templates and images for Mosaico editor
- persist mailings into DB
- manage users/groups
- download ZIP archives of mailings
- sending mailings by email for testing purpose
Pre-requisites:
- Node.js >=8.5.0
- PostgreSQL >=9.6 (postgresapp on a mac)
- Redis (
brew install redis
on macredis-server
to start) - SMTP server (like mailcatcher:
brew install ruby
– restart terminal –gem install mailcatcher
thenmailcatcher
)
NB: A compiled version of sharp — which is used to resize images and declared as a dependency — should be fetched automatically by npm for your system environment. In case of troubles see sharp installation instructions.
npm run deps
npm run dev
Then go to: http://localhost:3000
See the screencast https://youtu.be/sLzZq3cXDi0
Mosaico backend has a decent localhost-first default configuration.
You can override any of these values, in sereval ways, in order of precedence:
- command line arguments:
node server/worker.js --admin__password=shhhhht
- environment
backend_*
variables:export backend_admin__password="shhhhht" node server/worker.js
- creating a
.backendrc
JSON file placed at project's root folder:or you could also make a copy ofcat <<EOF > .backendrc { "admin": { "password": "shhhhht" } } EOF
.backendrc-example
NB: Internally, we use rc.
Heroku uses 2. environment config vars that will take precedence over our defaults: