A producttion ready blog portal built with HTML, Angular and Java.
- View live demo here
- Demo runs on Apache Tomcat 8.5.24 Azure WebApp
- Register to add new blogs
System requirements
PreRequisites
- An account with CosmicJS
- All the content will be stored and managed in Cosmic JS CMS
- Java 1.8.0_162
- Angular CLI 1.6.8
- NodeJS 10.5.0
- NPM 6.1.0
- Yarn 1.7.0
- Apache Maven 3.3.9
- Apache Tomcat 8.5.27
JAQ blog uses CosmisJS as the backend to hold the content (Users and Blog). The following are required
- Create a free account with CosmicJS
Add New Bucket
and name it (say) 'myblog'- Select
Apps
from the left nav, and installAngular Blog
- Select
Basic Settings
and note the below 3 properites. - Enter the above 3 values in the file
/ui.resources/src/config/cosmo.config.ts
JAQ Blog is built as primary Java application with Angular embedded within it. Maven is used to build the project.
- Fork and Clone the project to your local machine
- Open the file
- From the folder, use the command
mvn clean package
to build JAQBlog's WAR file.
Using Tomcat as an example:
- Open tomcat's admin console like
http://sampleserver.com:8080/manager/html
- Choose
Select WAR file to upload
, uplaod thejaqblog.war
- If the deployment is successful, you can see
/jaqblog
in the deployed applications. - Open a new browser and use this url
http://samplesever.com:8080/jaqblog
. You should seeJava Hello World!
- To run the blog, use the url
http://samplesever.com:8080/jaqblog/initializr
. You should see the blog home page loaded
- View blog posts
- Register to the blog
- Login
- Add a new blog
JAQ blog has been built as Java first web application with all of front-end managed using Angular.
This can be extendable to use Java to make REST calls to any CMS (or any service) and have Angular consume the return data and act accordingly.
- Java
- Sample Java servlets are defined at
/Users/konathal/Personal/SurenProjects/suren-blog/git/jaqblog/src/main/java/com/jaqstack/servlet
- Sample Java servlets are defined at
- MongoDB
- Sample Java class to connect to MongoDB
/Users/konathal/Personal/SurenProjects/suren-blog/git/jaqblog/src/main/java/com/jaqstack/data/MongoExample.java
- Sample Java class to connect to MongoDB
For more examples on the above, you may see JAQ Stack's examples on Github
- The core of the blog was forked from Angular Blog
- Designed, developed and architected by Suren Konathala Contact/Tweet @surenkonathala