{"id":14982120,"url":"https://github.com/moizkachwala/angular2-express-mongoose-gulp-node-typescript","last_synced_at":"2025-10-24T05:07:11.716Z","repository":{"id":172468537,"uuid":"60765316","full_name":"moizKachwala/Angular2-express-mongoose-gulp-node-typescript","owner":"moizKachwala","description":"AngularJS 2 (Updated to 4.2.0) Mean Stack application which uses Angular2, Gulp, Express, Node, MongoDB (Mongoose) with Repository Pattern Business Layer","archived":false,"fork":false,"pushed_at":"2017-06-15T07:50:09.000Z","size":143,"stargazers_count":196,"open_issues_count":1,"forks_count":85,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-24T03:47:40.986Z","etag":null,"topics":["angular","angular2","angularjs","expressjs","gulp","hero","mongodb","mongoose","repository-pattern","seed-application","tour","tslint","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moizKachwala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-09T10:05:20.000Z","updated_at":"2024-08-03T05:36:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"cfdff994-5de5-4155-a049-6b00d0218545","html_url":"https://github.com/moizKachwala/Angular2-express-mongoose-gulp-node-typescript","commit_stats":{"total_commits":79,"total_committers":7,"mean_commits":"11.285714285714286","dds":"0.17721518987341767","last_synced_commit":"79f12f9962a5d13c4d949634c53ec46c791f3786"},"previous_names":["moizkachwala/angular2-express-mongoose-gulp-node-typescript"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moizKachwala%2FAngular2-express-mongoose-gulp-node-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moizKachwala%2FAngular2-express-mongoose-gulp-node-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moizKachwala%2FAngular2-express-mongoose-gulp-node-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moizKachwala%2FAngular2-express-mongoose-gulp-node-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moizKachwala","download_url":"https://codeload.github.com/moizKachwala/Angular2-express-mongoose-gulp-node-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250560007,"owners_count":21450168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular2","angularjs","expressjs","gulp","hero","mongodb","mongoose","repository-pattern","seed-application","tour","tslint","typescript"],"created_at":"2024-09-24T14:04:49.473Z","updated_at":"2025-10-24T05:07:11.654Z","avatar_url":"https://github.com/moizKachwala.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## [ Angular2 Updated to 4.2.0 ]\n# Angular2 MEAN - QuickStart application with ExpressJS, MongoDB, Gulp and Typescript (Repository Pattern)\n\n[![Build status](https://ci.appveyor.com/api/projects/status/y7cp312hef8sju0w/branch/master?svg=true)](https://ci.appveyor.com/project/moizKachwala/angular2-express-mongo-gulp-node-typescript/branch/master)\n[![Gitter](https://badges.gitter.im/moizKachwala/Angular2-express-mongo-gulp-node-typescript.svg)](https://gitter.im/moizKachwala/Angular2-express-mongo-gulp-node-typescript?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n[![Dependency Status](https://david-dm.org/moizkachwala/Angular2-express-mongo-gulp-node-typescript.svg)](https://david-dm.org/moizkachwala/Angular2-express-mongo-gulp-node-typescript)\n[![devDependency Status](https://david-dm.org/moizkachwala/Angular2-express-mongo-gulp-node-typescript/dev-status.svg)](https://david-dm.org/moizkachwala/Angular2-express-mongo-gulp-node-typescript#info=devDependencies)\n\n##Introduction\n\nBasic Angular seed application created with Quick start application (Tour of Heroes) given on angular website. It uses ExpressJS along with Mongo DB support (Mongoose) via a wrapper of Repository Pattern as Business layer.\nIt also uses Gulp for running task and TsLint.The seed application is built over node and uses latest node packages.\n\n## [https://angular2-express-mongoose.herokuapp.com/](https://angular2-express-mongoose.herokuapp.com/)\n\n## Prerequisites\n\n1. Latest version of Node to be installed.\n2. Install MongoDB and make sure it is running on default port 27017 (if not then please configure constants.ts and change the connection for mongoDB).\n\n## Global packages\n```\n    npm install ts-node -g\n    npm install typescript-node -g\n```\n\n## Steps to Run\n```sh\n    npm install          \u003c= install all the npm Dependencies\n    npm run build        \u003c= build and compile the dest folder\n    npm run deploy       \u003c= start the Nodemon and watch for changes.\n```\n\n## Directory Structure\n\n```\nangular2-MEAN\n    ├── node_modules\n    ├── client\n    │    ├── app\n    │    │    ├── Components\n    │    │    │    ├── dashboard\n    │    │    │    │    ├── dashboard.component.css\n    │    │    │    │    ├── dashboard.component.html\n    │    │    │    │    ├── dashboard.component.ts\n    │    │    │    ├── heroDetail\n    │    │    │    │    ├── hero-detail.component.css\n    │    │    │    │    ├── hero-detail.component.html\n    │    │    │    │    ├── hero-detail.component.ts    \n    │    │    │    ├── heroes\n    │    │    │    │    ├── heroes.component.css\n    │    │    │    │    ├── heroes.component.html\n    │    │    │    │    ├── heroes.component.ts    \n    │    │    ├── models\n    │    │    │    ├── hero.ts\n    │    │    ├── services\n    │    │    │    ├── hero.service.ts            \u003c= Hero Service for fetching api\n    │    │    ├── app.component.css\n    │    │    ├── app.component.ts\n    │    │    ├── app.html\n    │    │    ├── app.module.ts\n    │    │    ├── app.routing.ts\n    │    │    ├── main.ts\n    │    ├── typings\n    │    ├── index.html\n    │    │    ├── systemjs.config.js\n    │    ├── tsconfig.json\n    │    ├── typings.json\n    ├── server\n    │    ├── src\n    │    │    ├── app\n    │    │    │    ├── business                    \u003c= business logic for application\n    │    │    │    │    ├── common\n    │    │    │    │    │    ├── Read.ts           \u003c= common Read method\n    │    │    │    │    │    ├── Write.ts          \u003c= common Write method\n    │    │    │    │    ├── interfaces\n    │    │    │    │    │    ├── HeroBusiness.ts\n    │    │    │    │    ├── BaseBusiness.ts\n    │    │    │    │    ├── HeroBusiness.ts\n    │    │    │    ├── dataAccess\n    │    │    │    │    ├── schemas\n    │    │    │    │    │    ├── HeroSchema.ts    \u003c= Hero Schema for MongoDB\n    │    │    │    │    ├── DataAccess.ts         \u003c= Connection with MongoDB\n    │    │    │    ├── model\n    │    │    │    │    ├── interfaces\n    │    │    │    │    │    ├── HeroModel.ts\n    │    │    │    │    ├── HeroModel.ts\n    │    │    │    ├── repository\n    │    │    │    │    ├── interfaces\n    │    │    │    │    │    ├── Read.ts\n    │    │    │    │    │    ├── Write.ts\n    │    │    │    │    ├── BaseRepository.ts\n    │    │    │    │    ├── HeroRepository.ts\n    │    │    ├── config\n    │    │    │    ├── constants\n    │    │    │    │    ├── constants.ts         \u003c= Constants - mongodb connection string.\n    │    │    │    ├── routes\n    │    │    │    │    ├── HeroRoutes.ts        \u003c= Hero API Routes like get,post,put,delete\n    │    │    │    │    ├── Routes.ts            \u003c= fetching all appliction routes here\n    │    │    ├── controller\n    │    │    │    ├── interfaces\n    │    │    │    │    ├── ReadController.ts\n    │    │    │    │    ├── WriteController.ts\n    │    │    │    ├── BaseController.ts         \u003c= Base Repository controller\n    │    │    │    ├── HeroController.ts\n    │    │    ├── server.ts\n    │    ├── typings\n    │    ├── tsconfig.json\n    │    ├── tsconfig.json\n    ├── gulpfile.ts                              \u003c= gulp tasks : clean, build, compile, run.\n    ├── LICENSE\n    ├── package.json\n    ├── README.md\n    ├── tsconfig.json\n    ├── tslint.json\n    \n```\n\n## Features (Angular2, Express, Gulp, MongoDB, Node)\n\n1.  Angular 2 Quick Start application (Tours of Hero) from https://angular.io/docs/ts/latest/quickstart.html\n2.  Added support for Gulp so that js files are moved out of the app folder.\n3.  It will create a dist folder where it will place all the js files.\n4.  Gulp will monitor for the changes via help of watcher.\n5.  Created folder structure for easy access of components, services and models.\n6.  Applied tslint for avoiding any typos.\n7.  Implemented best practices recomended on the Angular 2 website.\n8.  Implemented Express Server to Host API's\n9.  Added MongoDB support to communicate our Heroes data to Database\n10. Implemented Repository Pattern to communicate with Mongoose.\n\n## Api Document (from MongoDB)\n\n```\n1. getAll    http://localhost:3000/api/heroes             \u003c= get all heroes\n1. getById   http://localhost:3000/api/heroes/:id         \u003c= get hero by Id\n2. post      http://localhost:3000/api/heroes             \u003c= create hero\n2. put       http://localhost:3000/api/heroes/:id         \u003c= update hero\n2. delete    http://localhost:3000/api/heroes/:id         \u003c= delete hero\n\n```\n## Dependencies\n\n1. Angular 2\n2. TypeScript\n3. Gulp\n4. ExpressJS\n5. NodeJS\n6. Nodemon\n7. TsLint\n8. MongoDB\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoizkachwala%2Fangular2-express-mongoose-gulp-node-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoizkachwala%2Fangular2-express-mongoose-gulp-node-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoizkachwala%2Fangular2-express-mongoose-gulp-node-typescript/lists"}