/mean-ts-starter

A MEAN infrasture with typescript

Primary LanguageTypeScript

MEAN-TYPESCRIPT-STARTER

Current Version : 0.3.0.
This project using Express / Angular-Cli / NodeJS for web application development.

Index

Development Enviroment Setup

  1. Install MongoDB - NoSql Database (This is optional , if you're sure you don't need a database)
  2. Install Node.js - Server

To check if you have installed NodeJs , open your Terminal (MAC) or CMD (Windows), you should able to see your node version. I recommend you using LTS version of NodeJs

$ node -v
v8.12.0
  1. Install Angular-Cli - Front-end frame-work for building Single Page Application
$ npm install -g @angular/cli
  1. Development Enviroment Check : ( ver. 0.3.0 )
$ ng version
Angular CLI: 7.3.0
Node: 8.12.0
OS: darwin x64
Angular: 7.2.3
... animations, common, compiler, core, forms, http
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.0
@angular-devkit/build-angular     0.13.0
@angular-devkit/build-optimizer   0.13.0
@angular-devkit/build-webpack     0.13.0
@angular-devkit/core              7.3.0
@angular-devkit/schematics        7.3.0
@angular/cli                      7.3.0
@angular/compiler-cli             7.2.6
@ngtools/webpack                  7.3.0
@schematics/angular               7.3.0
@schematics/update                0.13.0
rxjs                              6.4.0
typescript                        3.2.4
webpack                           4.29.0
  1. Install Gulp - Automate build work-flow (including typescript compiler / nodemon )
$ npm install -g gulp-cli

Getting Start

Open your terminal and locate to the mean-starter project folder and install the dependencies by using :

$ npm install 

Run gulp to start the node server :

$ gulp

Ater running this command , Browser-sync will open a new Chrome Tab for you on localhost:3000. It will keep loading (known bug), kill the loading process and refresh it will be working fine. Browser-sync is proxying the localhost:7000 ( you can use this as well, but it will not auto refreshed while your Angular chages ).

Another Terminal , run :

$ ng build --watch

This allows angular-cli to compile your Angular application into dist folder.

If you need Mongo DB :

$ mongod

After installed mongodb in your compuer , you should put it into config.json Check config.json.

Open Chrome and go to localhost:7000, this should render basic Angular App.

Project Documents