nice app with code paser and sending mails usingAPI
The app consists of 4 main parts:
- [converter query strings to object](#converter query strings to object)
- bodyParser (generating html from template and given values)
- [generating preview / view of generated parsered html](#generating Preview)
- [sending email](#sending email)
convert query params as key and values of object (object format of data is requaired to the next step[with parser])
f(x) call
searchParams(string_to_convert)
examples of string_to_convert
?name=Filip&email=filip%40ciac.me&luckyNumber=20
?name=Mort?age=20
default value is getting from web addres
f(x) call
parser(parserConfig)
const parserConfig = {
template: template:String,
fsValues: values:Object
}
How should look like template? fields to replace:
{{name}}
example of template:
<h1>Hello {{name}}</h1><p>{{age}}</p>ur email:<p>{{email}}<p>
fsValues should be object
const parserConfig = {
fsValues: {name: 'Filip', email: 'filip@ciac.me', luckyNumber: '20'}
template: "<h1>Hello</h1><p>{{name}}</p><p>{{email}}<h3>{{age}}</h3><hr>"
}
drawTemplate(view)
view - just html
SOON