MEAN Stack Demo App (UPDATE)

Last year, I created a simple MEAN Stack demo app and published the code on github and deployed it here. I haven’t had a lot of time to keep working on it since then, but this week I did manage to make some improvements to it.

The biggest change I made was that I converted the entire application to be a single page application, eliminating the need for server-side views rendered by node and instead relying entirely on Angular, even for authentication. The approach I settled on for authentication is to use JWT (JSON Web Tokens) as it allowed me to secure API requests without needing to use session or cookies. In fact, I was able to entirely remove session and cookie support from my server-side code because of this change. In a small app like this, it’s not a big deal, but for a larger app, not needing server-side session can improve scalability and simplify application deployment in multi server environments.

As part of the conversion to being a true single page application, I also made the decision to use UI Router. UI Router is better than Angular’s ngRoute in many ways, but the primary driving factor is its ability to nest views, which simplifies the page layout, allowing the header and footer of my page to be broken out into separate views.

Finally, I created a build process using Gulp. Gulp is something I was not too familiar with at the time I originally created the MEAN Stack demo app last year, but since that time, I’ve learned just how powerful it can be and how easy it makes things. I’m coming from a vantage point of having had some exposure to using MSBuild in .NET, so Gulp to be is just so much more powerful and more intuitive than MSBuild and I actually enjoy using it. The best part is it’s just code.

I hope to continue updating this app over time and hopefully not take so long this time, but we’ll see. I tentatively plan on making some UI improvements (away from the default bootstrap appearance), using SASS to compile into CSS, and adding a dashboard page with some charts and a few ways to visualize data.

Leave a Reply

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