Skip to content

A full-stack JavaScript solution that uses MongoDB, Express, Angular 9, and Node.js

License

Notifications You must be signed in to change notification settings

gymitoso/mean-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mean Stack

A full-stack JavaScript solution, which provides a starting point for MongoDB, Node.js, Express, and Angular based applications.

Before You Begin

Before you begin I recommend you read about the basic building blocks that assemble a MEAN.JS application:

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

Cloning The GitHub Repository

Use git to directly clone this repository:

git clone https://github.com/gymitoso/mean-stack.git

Quick Install

To install the dependencies, run this in the application folder from the command-line:

npm install

And then install MongoDB with docker compose and execute the database migration:

docker-compose -f ./docker/mongo.yml up -d
npm run migrate-db

The first command will setup the MongoDB on port 27018 and the second will create a user (sys-admin@mean.com - admin) in MongoDB.

Running Your Application

Run your application using npm:

npm start

Your Angular application runs on port 4200 with the development environment configuration, so in your browser just go to http://localhost:4200. The Node.js API runs on port 4000, so in your browser just go to http://localhost:4000/api/health and the browser should display 'OK'.

Running in Production mode with Docker

To run your application with production environment configuration:

docker-compose up -d --build

This will setup your Angular and Node.js application in port 4000. This application uses Nginx to proxy requests in production.

Linting

This app includes a static code analysis setup with ESLint. I recommend that you install the relevant IDE extensions for ESLint. Once you do, every time you press save, all your code will be formatted and reviewed for quality automatically. I also set up a git hook to automatically analyze your code before it is committed.

Credits

Linnovate

Mean.js

License

The MIT License