git clone https://github.com/clarkbw/loopback-example-email-templates.git
cd loopback-example-email-templates
npm install
bower install
slc run
In this example, we create an email template application that shares CSS between the client side and the email templates on the server side. Built with LoopBack on the server side.
##Prerequisites
###Tutorials
###Knowledge
##Procedure
###1. Create the application
####Application information
- Name:
loopback-example-email-templates
- Directory to contain the project:
loopback-example-email-templates
slc loopback loopback-example-email-templates
... # follow the prompts
cd loopback-example-email-templates
###2. Customize the client bootstrap styles
Open up the less
directory to edit the bootstrap imported styles.
You can remove imports you aren't using or custom variables, look in the bootstrap variables.less
file for others.
###3. Customize the email verify templates
Open up the template/verify
directory and edit the files you see in there.
-
html.ejs
holds the HTML that will used to render the email. -
text.ejs
holds the Plain Text that will render to the fallback text version of the email. -
style.less
imports the global client styles and allows you to make custom changes just for emails
###4. Run the application
From the project root, enter slc run
and browse to localhost:3000
to view the application.