MySpace From Scratch — Part 2. Setting Up The Environment. First we need to setup our project folder. I’m going to follow a server / client pattern. So one folder for the project, with two sub folders inside, one for the API, one for the Client.
Let’s dive right in. First we need to setup our project folder. I’m going to follow a server / client pattern. So one folder for the project, with two sub folders inside, one for the API, one for the Client. Like so:
/myspace
/api
/client <-- this we will create with the Vue CLI
To start we need to spin up a new node project. So I go to the api directory & npm init
And walk through the steps. Nothing special, using all the defaults. Then I install express for my web framework: npm install express --save
Mongoose for my DB npm install mongoose --save
Nodemon for auto refreshing with code changes npm install nodemon --save
And CORS to handle cross-origin requests npm install cors --save
🔥 Node.js Certification Training: https://www.edureka.co/nodejs-certification-training This Edureka video on 'Node.js Docker Tutorial' will help you in learn...
Following the second video about Docker basics, in this video, I explain Docker architecture and explain the different building blocks of the docker engine; docker client, API, Docker Daemon. I also explain what a docker registry is and I finish the video with a demo explaining and illustrating how to use Docker hub.
Node.js and Docker together create a seamless local development environment. We will see how we can use Node.js with Docker to improve the developer experience. Learn how to use docker build efficiently and leverage Docker Compose to achieve a seamless local development environment. We will use a demo Express.js application as an example. This tutorial will use commands that will run on Unix-like systems like Linux or macOS with a shell. This is going to be a condensed post where we dive directly into setting up the app, so you may want to read up on Docker and Node if you feel so inclined.
How to Dockerize a Node.js application. I probably have containerized a bunch of node app. This beginners guide aims to assist you in building and deploying a simple Node.js application image. This guide also assumes you have some basic knowledge of node and express framework.
This Edureka video on 'Node.js Docker Tutorial' will help you in learning how to dockerize a Node.js application.