Simple node.js database solution based off lodash called lowdb.

When it comes to database solutions that are popular in a node.js environment the first project that comes to mind is of course mongoDB. I am no database expert, it strikes me as a decent solution, but it might not be the best tool for the job with simple projects. Also It complicates the process of deployment, and setup as another application besides node needs to be installed. Thats why a simpler solution like lowdb is sometimes what a project calls for.

Read More

Node path module general overview

Working with paths in node.js is something that comes up all the time when it comes to file system related tasks. When doing so there is a desire for a nice module to help with joining paths together, and help with problems that have to do with the differences of how paths are handled in windows and linux systems. There are also many other concerns surround paths such as the difference between relative and absolute paths.

So I could look for some kind of npm package, or other user space copy and past type thing to help me out with this, or take the time to writ my own code. However for for the most part there is no need to bother with any of that as the node.js built in path module can help with a great deal of these kinds of tasks when working with file system paths.

Read More

Overcoming distractions when trying to focus on a javaScript related project.

When focusing on a javaScript related project, there can be a great many distractions that can interfere with my ability to focus on a project. Some of them are just complete wasts of time, others are somewhat pleasant or necessary. However all of them can derail my chain of thought, or get in the way of me making progress. However with a little effort it might be possible to get some of these under control, ether by stopping them completely, or finding was to keep them from monopolizing to much of my time. Some of them I have made progress with, others still seem to get in the way, but regardless writing about them might help. I do not write these kinds of blog post related posts often but I thought I would break from the norm with this one.

Read More

Using the angular.js ng-show directive to toggle the display of an element

When working with angular.js there may come a time to have a way to toggle the display of a given element. There are many ways of doing this, but if you wish to stick to some kind of angular.js built in way of pulling it off there is ng-show.

The ng-show directive will show or hide the element that it is used in depending on the expression provided to it with the ng-show attribute. This can be a useful way to toggle the display of something on and off, such as a UI component of some kind that is part of a custom directive.

Read More

Making my chart element using angular.js and chart.js

I have been diving into angular.js these days, and it is turning out to be one of those things I wish I did a long time ago. I have been making a lot of demos for my test_angular project and then writing about them here. For one of my demos I thought it would be fun to begin to explore this idea of using angular to extend html by making my own elements. A little ways back I wrote a post on chart.js Which is a pretty cool project for making canvas charts, so why not some kind of chart element that makes use of angular.js and chart.js?

Read More