• Share on Tumblr
  • Sharebar

I have created simple blog (http://gamb.herokuapp.com/) using GrailsAngularJS and MongoDB. This blog uses grails asset pipeline plugin to minify, uglify and bundle resources. Minification of CKEditor is disabled as it was causing some errors. You can find the source on GitHub.

You can use following credential to login to admin area of the blog.

http://gamb.herokuapp.com/admin/

Username: admin

Password: admin123

Note: To keep the integrity of the blog updates and deletes have been disabled.

Two different grails layout are created to initialize frontend and backend app. You can find following entries in URLMappings file pointing to path of these apps.

“/”(view:”/blog/index”)

“/admin”(view:”/admin/index”)

Frontend and Backend of the application are seprated in two different folders.

All the assets and angular views for Frontend can be found in following path

gamb/grails-app/assets/javascripts/blog.js (Asset pipeline frontend manifest)

gamb/grails-app/assets/javascripts/blog/* 

gamb/grails-app/assets/stylesheets/blog/*

gamb/web-app/blog/* (Angular JS html views)

All the assets and angular views for Backend can be found in following path

gamb/grails-app/assets/javascripts/admin.js (Asset pipeline backend manifest)

gamb/grails-app/assets/javascripts/admin/* 

gamb/grails-app/assets/stylesheets/admin/*

gamb/web-app/admin/* (Angular JS html views)

All angular plugins are installed using bower. Just goto dir gamb/grails-app/assets/ and run following command to install additional plugins.

bower install <package>

Key Plugins of Grails

 

Following plugin are purely for deploying on Heroku

Key Plugins of Angular

 

  • Angular route – for manging routes
  • Angular sanitize – for encoding html written in posts
  • Angular resourece – for communicating with APIs
  • Angulartics – for Google Analytics tracking
  • Angular http auth inteceptor – for authentication and intercepting authorized requests
  • Angular bootstrap – Twitter bootstrap

Please leave your valuable comments below.

Note: You may have to refresh the hosted blog at heroku couple of times if you are the 1st one accessing it in the last 2 hours as the free version of heroku goes to sleep after a while.

Tagged with:
 

5 Responses to Blog using Grails, AngularJS and MongoDB

  1. Muhammad Uzair Baig says:

    Very nice article, really helpful.

  2. vasya10 says:

    You could try textAngular, instead of CKEditor. It plays nicely with AngularJS.

  3. Alica says:

    Hello! Would you mind if I share your blog with my facebook group?
    There’s a lot of people that I think would really enjoy your content.

    Please let me know. Cheers

    my homepage: additional resources – Alica -

  4. Tunji says:

    When I tried to run the application, i got the error below:| Downloading: jansi-1.11.jar.sha1
    | Error Failed to resolve dependencies (Set log level to ‘warn’ in BuildConfig.groovy for more information):

    - jline:jline:2.11
    - net.java.dev.jna:jna:4.0.0
    - org.fusesource.jansi:jansi:1.11
    i tried grails clean, grails refresh dependencies and grails upgrade but still with the same error. Do you know what could be causing this?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>