Modern MEAN Stack Tutorial with Docker (Angular, Node, Typescript and Mongodb)

Modern MEAN Stack Tutorial with Docker (Angular, Node, Typescript and Mongodb)

The MEAN stack allows you to build complete applications using one programming language: JavaScript. In this tutorial, we built upon the first part (Creating an Angular app) which built the front-end, and this part builds the backend with a RESTful API and Database.

The MEAN stack allows you to build complete applications using one programming language: JavaScript. In this tutorial, we built upon the first part (Creating an Angular app) which built the front-end, and this part builds the backend with a RESTful API and Database.

REST API with Node.js

We are going to use express generator and create a folder called server.

First install the generator packages:

1
npm i -g express-generator

Note: You should have Node and NPM/Yarn installed.

REST API using ExpressJS

Now let’s scaffold the app using the generator:

1
express server -e

Let’s install all its dependencies on the server folder:

1
cd server && npm i

and now let’s make sure it’s working:

1
npm start

Go to localhost on port 3000 and make sure you can see a “Welcome to Express”

http://localhost:3000/

Changes: a3fcacd - REST API using ExpressJS: scaffold

Creating a host alias for the server

We want to run the server to work regarless of the enviroment where we run it. (It will be useful for Docker later on)

For that we can create an alias by editing the hosts:

  • Windows: c:\windows\system32\drivers\etc\hosts
  • Linux/Mac: /etc/hosts

Once you can open the file, you drop the following line at the end:

docker mean stack node angular typescript mongodb

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Authentication In MEAN Stack - A Quick Guide

Everything you should know about Authenticating in MEAN stack applications with comprehensive explanation and necessary code snippets.

What Is MEAN STACK and Scope of MEAN STACK Developer ?

Best Mean Stack training skills from top-rated web development experts. CETPA Offers online basic to advanced courses to help you master the full MEAN Stack including MongoDb, ExpressJS, AngularJS and NodeJs.

Stack MEAN | Angular, Node, Express & MongoDB. Introducción Práctica

Este video es una introducción práctica del stack MEAN. un conjunto de tecnologías de Javascript, que permite la creación de aplicaciones Web, tanto de código de Frontend como de Backend. Stack MEAN | Angular, Node, Express & Mongodb. Introducción Práctica

Angular 10 + MongoDB example with Node.js Express: MEAN stack CRUD App

In this tutorial, I will show you how to make Angular 10 connect to MongoDB with Node.js Express. We’re gonna build a full-stack (MEAN stack) CRUD Application in which, the back-end server uses Node.js + Express for REST APIs, front-end side is an Angular App with HTTPClient.

MEAN Stack (Angular 10) Tutorial: Upload Image File

In this tutorial, we will show you how to upload an image file in MEAN (MongoDB, Express.js, Angular 10, Node.js) stack app using Multer. We will use the previous tutorial on the REST API image upload with the latest version and dependencies for this tutorial.