Blog

How To Implement Google Sign-In To Your Website

You’ve probably seen this button around the web: Websites that use this button let you login using your Google Account as an alternative to creating an account on that particular page. Why use Google Sign-In? In the ever pacing world of the internet, to get customers to use your website, it needs to be fast.
By paranerd | Sep 19, 2018

Hello NodeJS | Adding CSS And JavaScript

Even if our HTML-Hello-World is very cool, it does still look a little boring. Time to add some styling! In our public/ folder we first add subfolder called css/. In there we create a file design.css with the following content: 1 2 3 h1 { color: red; } We reference this file in our views/index.
By paranerd | Sep 17, 2018

Hello NodeJS | Advanced Routing

As we’ve already learnt, the basic approach to routing can make our server.js unreadable in bigger projects. In this chapter we’ll get to know a slightly better way to do it (spoiler alert: there’s an EVEN better version, but we’ll get to that later). To keep our server.js nice and clean, it’s usually better to handle routing in a dedicated place
By paranerd | Sep 17, 2018

Hello NodeJS | Authentication with PassportJS

The so-called ‘Login-System’ that we put up so far isn’t quite… secure, to say the least. The way it is currently implemented, anyone could come by, ’login’ and have an account created. Let’s toughen that up and replace it with some proper authentication mechanisms. First things first - we need more packages!
By paranerd | Sep 17, 2018

Hello NodeJS | Basic Routing

So far we’ve only set up a single landing page. In some cases this is sufficient, but usually you might want to have other pages on your website as well. To demonstrate how this works with Node and Express, we will prepare a nice little login form. For that we need a file views/login.
By paranerd | Sep 17, 2018

Hello NodeJS | Conclusion

This is the end of our basic Hello World introduction of how to setup a server with NodeJS. We are now able to use npm to our advantage and learned about the general structure of a NodeJS-Project. We know how to deliver pages using ExpressJS and how routing between pages works.
By paranerd | Sep 17, 2018

Hello NodeJS | Controllers

Controllers allow organizing your site’s routing into smaller, more maintainable chunks. Now we can finally use that controllers/ folder! What this system does is separating our routes into controllers, each with a specific job. For example, in a webshop you might have one controller for handling requests to articles, another for account-management and yet another for customer-support.
By paranerd | Sep 17, 2018

Hello NodeJS | Databases

Quick introduction to MongoDB MongoDB is a so-called NoSQL-Database (in contrast to SQL-Databases like MySQL). Unlike traditional databases these don’t require fixed table relations or a pre-defined schema which makes them more flexible to work with. While NoSQL is not out there to replace SQL there are use cases where they’re better suited for the job.
By paranerd | Sep 17, 2018

Hello NodeJS | Hello World

Before we move on to more boring stuff like setting up or project properly, let’s do something fun! Creating a Hello World Application in NodeJS doesn’t require very much. Since we have the nodejs-package already installed on our system, all we need is a file called server.js in our project-folder with the following line in it:
By paranerd | Sep 17, 2018

Hello NodeJS | Installation

Welcome to this introduction to NodeJS! In the following chapters I covered all the basics you need to get started in development for NodeJS. I tried to be as precise as possible, leaving out all the cluttering bells and whistles in an attempt to give you a clear view of only the important parts.
By | Sep 17, 2018