Building a NodeJs full stack app from scratch for beginners. Part 0.

BIENAIME COPAIN FABRICE
4 min readApr 2, 2019
Photo by Pankaj Patel on Unsplash

Many people tend to think that coding is hard basically when it comes to building a full stack web application, that involves interacting with the server, database and other backend tasks. Well in this series of posts, I am going to try to break that into very simple and easy to understand concepts. I don’t know exactly the number of parts I will have to post but expect one part each week until we build a full stack application like the medium.

we are going to build a multi-vendor blog, that we will call “The Blog”. For this project we shall be using, NodeJs, Express Js and React, and persisting our data with Postgres. While there is no pre-requisite to building such application but a background in computer science and programming is very important. I will be collaborating with other engineers, and referencing as much as possible for you to understand all the concepts.

NB:

I won’t be showing how to write PT stories, I hope that you will learn that on your own. If you want to make reference to my PT board, click here

This part 0 is for you folks that are complete beginners to version control and git. if you are advanced, feel free to skip this part and go right to part two. or any other part you want.

Before we jump right in, here are things to know:

other recommended courses on this:

https://openclassrooms.com/en/courses/4614926-learn-the-command-line-in-terminal

Other recommended courses on this:

https://openclassrooms.com/en/courses/3321726-manage-your-code-with-git-and-github

Alright! let’s jump right into setting everything we will use.

Assuming, you already have an account on GitHub and Pivotal Tracker; let’s set our project:

  1. On GitHub create a repository, initialize it with README.md file and .gitignore directory for Node.
  2. In your terminal write: git branch to confirm you are on the master branch
The green colour with a * shows the branch you are currently on.

3. still on your terminal write git checkout -b develop this command is to create a new branch that we are naming develop because we want it to be our development default branch. I will explain this don’t worry.

Now you see that the green colour has changed to develop. That is because now develop is our active branch.

4. Now let’s commit our new branch, and then push to have it on GitHub. use the following command:

git commit -m “initial commit” and hit enter.

Every commit should have a message explaining what it is… and this is our initial commit.

sooo…. I am guessing if you haven’t read the resources shared above, you are wondering what commit is and why we are doing it. I will not go through that …. Go back to basics of git and understand those commands hah!

note that after committing, there is a message in the terminal telling us that our working tree is clean, that there is no change to commit. That is we haven’t started making changes on our project.

5. It’s time for us to push. Go ahead and run this command:

git push — set-upstream origin develop

To understand why upstream and origin read this

Now go on Github and see the changes on your Repo.

Now you see that we have 2 branches. Go ahead and click on that.

Let make the develop branch our default branch.

Now we have develop as our default branch.

Alright! remember, develop is our default branch, that means we shall be merging everything on that branch for our development because we don’t want our master branch to have code that is still in progress of development.

Thank you for your attention to all or this, we are going to start with setting up our project. see you in the next part.

Pivotal Tracker Boards

GitHub Repository

If you wish to contact me, feel free to send me a DM on twitter @copainBien

--

--

BIENAIME COPAIN FABRICE

Full stack Software Engineer @ Andela Kigali | Postgres | React | Express | Node. I learn by writing and sharing.