/ng2-mean-starter

Starter for application based on MEAN stack with use of Angular 2

Primary LanguageTypeScript

ng2-mean-starter

dependencies Status devDependencies Status

Starter for application based on MEAN stack with use of Angular 2.

MEAN

Installation

npm install

Compile TypeScript

npm run tsc

Compile SASS

npm run sass

Starting app

Starting with TS and SASS watchers

npm start

Starting without TS and SASS compilers

npm run server

Config

MongoDB accesses and files paths could be configured in config.ts

Default config

// Mongo database URL
export const dbUrl:string = 'localhost:27017/test';

// Mongo database login
export const dbUser:string = undefined;

// Mongo database password
export const dbPwd:string = undefined;

// Images path
export const imgPath:string = 'static/public/images/';

// Avatars path
export const avtrPath:string = 'static/public/images/avatars/';

// Files path
export const filePath:string = 'static/public/files/';

// Port
export const port:number = process.env.PORT || 3000;

Seed database

Database seed could be write in helpers/seed.ts

Run seed with npm run seed command

Unit tests

Unit tests with use of Jasmine should be added in spec/ folder.

Unit test file name pattern: *.spec.ts

Run unit tests with npm test command

Create new component

To create new component you can run bash script ./newcomponent.sh <name> from main directory

It should create files:

app/components/<name>.component.ts
app/templates/<name>.component.html
app/styles/sass/<name>components.sass

Used additional packages

CSS framework

Icons package

Additional ng2 packages

Additional Express packages

Additional packages

Used additional dev packages

Unit tests

SCSS / SASS

TypeScript