If you’ve been a developer for a while, then you hopefully know it is wise to
keep secret information such as passwords and encryption keys outside of source
control. If you didn’t know that, then surprise! Now you know.
Sometimes slip-ups do happen and a password ends up in a default config file or
a new config file was not added to “.gitignore” and that same someone ran “git
add .” and didn’t even notice it got committed. There should be protections in
place no matter how diligent your programmers are since nobody is infallible,
and the peace of mind is well worth it.
When programming, a lot of time is spent reading and debugging code. When coming
to grips with a new framework or library, it is important to know how to debug
it when things eventually go astray. Angular has a plethora of useful 1st party
and 3rd party tools that will aid you in debugging your application effectively.
GraphQL is becoming more relevant each passing day, and becoming necessary to
connect to many APIs on the web. In this post, I’ll show you how to connect to a
publically available GraphQL API with Angular and Apollo Client. You will need
basic knowledge of JavaScript to follow along, and although some basic Angular
knowledge is useful, it is not entirely necessary, and I’ll explain enough so
that anyone can follow along.
When writing software, it can be tedious to test features manually and ensure
your entire program continues to work as it evolves over time. We can use
automated testing to invoke our program automatically, and ensure it works as
expected.
In my previous article we learned how to connect to a PostgreSQL database using
the node-postgres package pg. This works fine, and will be perfect for many
applications, but one may also choose to opt for using an ORM instead.
If you plan on writing more advanced applications in Node.js, you may find the
need to store information persistently. Depending on the needs of the
application, you may opt for storing data in a relational database like
Postgres. In this article, I’m going to cover how you can use Node.js to connect
to and execute queries against a Postgres database.
When working with Node.js you’ll encounter code that is run synchronously and
asynchronously. When things run synchronously, tasks are completed one at a
time. All other tasks must be completed before another one can be started. As
discussed in our first Node.js post, Node.js uses an event loop to manage
asynchronous operations.
To continue where our last article left off, we’ll be showing you how to use npm
to download and use libraries in your Node.js applications. Open source
libraries will help you write less code and be more productive. The npm
ecosystem is diverse and has many thousands of useful libraries that you can use
absolutely free of charge!
Node.js is an open source project that allow you to run JavaScript outside of
the browser. As a consequence, Node has become very prevalent, and is a popular
choice for backend projects.
Our Labs website is written using Gatsby, and uses images in many places. We
have images that are both statically hosted, and images that are hosted in
Contentful.