This project uses the MEAN stack:
- MongoDB: database
- Express.js: backend web application framework running on top of Node.js
- Angular 2+: front-end web app framework; runs your JavaScript code in the user’s browser, allowing your application UI to be dynamic
- Node.js: JavaScript runtime environment – lets you implement your application back-end in JavaScript
The frontend is generated with Angular CLI. The backend is made from scratch. The whole stack is written in TypeScript.
Other tools and technologies used:
- Mongoose.js: MongoDB object modeling
- Bootstrap with Ng-Bootstrap: layout, styles and widgets
- Font Awesome: icons
- Google Fonts: fonts for the WEB
- JSON Web Token: user authentication
- Angular 2 JWT: JWT helper for Angular 2+
- Bcrypt.js: password encryption
Check prerequisites' status:
git --version
mongod --version
node --version # (2)
npm --version
google-chrome --version # (2)
npm list -g --depth 0 2>&1 | grep @angular/cli # (3)
(1) About installing Git, see How to Install Git on Linux, Mac or Windows, January 29, 2019 by Linode.
About installing Node.js, Npm, Node & Angular-CLI, see e.g. How to Install and Setup Angular 7 on Ubuntu 18.04.1, October 31, 2018 by Syamlal CM. For others OS, adequate similar articles are available on the net.
(2) To avoid trouble with Protractor 5.4.2, Node version should be at least 10.15.3 and Chrome version at least 74.0.3729.131-1. Check that
webdriver-manager
is in version 12.1.4. If needed, runnpm i -D protractor
: with Node 10.15.3+, it will updatewebdriver-manager
with the requiered version.
(3) See below about rechecking Angular-CLI's status under the project's folder.
git clone https://github.com/atao60/MEAN-Full-Stack mean-full-stack
cd mean-full-stack
cp .env.example .env
npm install
Check @angular/cli and npm packages' status:
npm outdated # See notes below
npm audit
ng --version
About
typescript
: its version is constrained to ">=3.4 <3.5" to please @angular/compiler-cli and @angular-devkit/build-angular.
All the npm scripts should work as it under Linux and Windows.
Run the application:
npm run dev:start
With concurrently, it will launch MongoDB and execute the application with Angular build, TypeScript compiler and Express server.
Angular and Express files are being watched. Any change automatically creates a new bundle, restart Express server and reload your browser.
Open a browser at localhost:4200.
Run the application:
npm run stage:start
It will launch MongoDB, build the project with a production bundle and AOT compilation then run it.
Open a browser at localhost:3000.
Run ng test:start
to execute the backend unit tests (via Mocha) and frontend unit tests (via Karma).
Run npm run test:client:start
to execute the frontend unit tests via Karma.
Run npm run test:server:start
to execute the backend unit tests via Mocha.
Run ng e2e:start
to execute the end-to-end tests via Protractor.
Run npm run lint
to execute both the frontend and backend TS linting via TSLint.
Run npm run lint:client
to execute the frontend TS linting via TSLint.
Run npm run lint:server
to execute the backend TS linting via TSLint.
Run npm run lint:html
to execute the frontend HTML linting via HTMLHint.
Run npm run lint:scss
to execute the frontend SCSS linting via SASS-Lint.
First run npm run build
(without AOP) or npm run client:prod:build
(with AOP).
Then run either npm run bundle-report-es5
, npm run bundle-report-es6
or both: each script will open a browser tab with sizes of output files.
To get more help about this project, visit the project wiki.
To get more help on the angular-cli
use ng --help
or go check out the Angular-CLI README.
- PWA
- Socket.io
- WebComponent
- I18n
- Technical and business logging
- Deployment on a server
- Deployment on Docker
-
DavideViolante/Angular-Full-Stack, Angular Full Stack project built using Angular 2+, Express, Mongoose and Node - And Bootstrap. Whole stack in TypeScript.
-
MEAN, without Typescript and with Material, not Bootstrap
-
madhums/node-express-mongoose, alike MEAN above
-
Analyzing bundle size with the Angular CLI and Webpack, Cory Rylan, Mar 1, 2017, Updated Feb 25, 2018 (with Angular 8).