Currently this is a prototype of the application for generating Digest email template from JSON file.
Supported JSON format for importing from:
{
"title": "Digest #4",
"contributeTo": "your_company@mail.com",
"companyName": "Your Company Name",
"publishedDate": 1476252979000,
"topics": [
{
"topic": "NEWS",
"articles": [
{
"title": "First NEWS title",
"description": "First article NEWS Description",
"url": "http://localhost/articles/first"
},
{
"title": "Second NEWS title",
"description": "Second article NEWS Description",
"url": "http://localhost/articles/second"
}
]
},
{
"topic": "PEOPLE",
"articles": [
{
"title": "First PEOPLE title",
"description": "First article PEOPLE Description",
"url": "http://localhost/people/first"
},
{
"title": "Second PEOPLE title",
"description": "Second article PEOPLE Description",
"url": "http://localhost/people/second"
}
]
}
]
}
Generated template will look into the following way:
Template is ready for sending via email.
Node.js and NPM should be already installed.
How to install Node.js see official documentation: https://nodejs.org/en/download/package-manager/
npm install -g grunt-cli
npm install -g bower
Go to the /web-src
Run the commands:
npm instal (to install npm dependencies)
bower install (to install bower modules)
grunt build --force
./gradlew build
or if Gradle is installed
gradle build
java -jar build\libs\html4email-x.y.z.jar.jar
where x.y.z - project version
or
./gradlew bootRun
-
Run application
-
Specify
JSONfile with Digest content -
Click on
Upload
-
Via Swagger UI: http://localhost:8080/swagger-ui.html
-
Via JSON: http://localhost:8080/v2/api-docs
Application uses MongoDB database.
database name: digest
collections:
- digests - collection with published Digests
- articles - collection with artciles which could be used for new Digests.