{"id":23134391,"url":"https://github.com/vmlweb/mean-angularjs","last_synced_at":"2025-10-30T00:21:14.223Z","repository":{"id":95819261,"uuid":"47762400","full_name":"Vmlweb/MEAN-AngularJS","owner":"Vmlweb","description":"MEAN Stack Template for AngularJS and Docker","archived":false,"fork":false,"pushed_at":"2016-01-10T12:47:47.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T19:24:24.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Vmlweb.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}},"created_at":"2015-12-10T13:09:22.000Z","updated_at":"2017-03-26T10:30:08.000Z","dependencies_parsed_at":"2023-03-17T13:30:57.626Z","dependency_job_id":null,"html_url":"https://github.com/Vmlweb/MEAN-AngularJS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vmlweb%2FMEAN-AngularJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vmlweb%2FMEAN-AngularJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vmlweb%2FMEAN-AngularJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vmlweb%2FMEAN-AngularJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vmlweb","download_url":"https://codeload.github.com/Vmlweb/MEAN-AngularJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142417,"owners_count":20890723,"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":[],"created_at":"2024-12-17T12:10:18.753Z","updated_at":"2025-10-03T16:40:15.743Z","avatar_url":"https://github.com/Vmlweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MEAN Stack Template\n\nQuick and simple template to get up and running with a MEAN stack web app inside of docker.\n\n## Features\n\n  * Docker and Docker Networking\n  * Grunt Workflows (Dev \u0026 Dist)\n  * JS, Angular and CSS Minify\n  * Jade and Stylus Templates\n  * Winston File \u0026 Console Logging\n  * Mocha, Karma and Chai Testing\n  * Runs under PM2 (Multi-Core)\n  \n## Libraries\n\n  * Docker\n  * MongoDB\n  * Express\n  * AngularJS\n  * NodeJS\n  * Semantic UI\n  * Mongoose\n\n## Prequisitions\n\nYou will need to have the following packages installed on your machine.\n\n```bash\nDocker\nNodeJS\nGrunt\n```\n\nYou can install the grunt command line tools with the following command.\n\n```bash\nsudo npm install -g grunt-cli\n```\n\n## Installation\n\nNow install the project dependancies and setup the development environment.\n\n```bash\ngit clone https://github.com/Vmlweb/MEAN.git\ncd MEAN\n\nnpm install\ngrunt setup\n```\n\nIf prompted for input use the default location or setting. (Press Enter)\n\n## Configure SSL\n\nTo use the https protocol we can sign our own SSL certificate for now.\n\n```bash\ncd server/config/ssl\nopenssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365\n```\n\nWe must now unlock the certificate by entering the same password we entered above.\n\n```bash\nopenssl rsa -in key.pem -out newkey.pem \u0026\u0026 mv newkey.pem key.pem\n```\n\nWe're now ready to start using the development environment commands.\n\n## Directory Structure\n\n- `client` - Client side website source.\n- `client/tests` - Testing setup for client website.\n- `data` - Development database binary files.\n- `dist` - Production ready distribution builds.\n- `logs` - Development JSON log files.\n- `public` - Built and minified client side website.\n- `semantic` - User interface framework source.\n- `server` - Server side application source.\n- `server/api` - API endpoints for server app.\n- `server/app` - Core functions for server app.\n- `server/config` - Configurations for server app.\n- `server/config/ssl` - SSL certificates for server app.\n- `server/models` - Database models and schemas for server app.\n- `server/test` - Testing setup for server app.\n\n## File Structure\n\n- `bower.json` - Client website package dependancies.\n- `docker-compose.yml` - Layout for running distribution build with compose.\n- `Dockerfile.mongo` - MongoDB database docker definition for distribution build.\n- `Dockerfile.node` - NodeJS application docker definition for distribution build.\n- `Grunt.js` - Workflow and build tasks.\n- `MongoDB.js` - Executed in MongoDB on database setup.\n- `package.json` - Server application package dependancies.\n- `semantic.json` - User interface framework configuration.\n- `server.sh` - Start or stop the production server.\n\n## Development\n\nFor development the primary working directories are.\n\n- `client` - Client side website source.\n- `semantic` - User interface framework source.\n- `server` - Server side application source.\n\nYou can start the development server which will rebuild any changes live.\n\n```bash\ngrunt dev\n```\n\nPress `control + c` to stop and exit the development server.\n\nMake sure the development server is stopped after you've finished working.\n\n```bash\ngrunt stop\n```\n\nUse the following to reset the development server database and logs.\n\n```bash\ngrunt reset\n```\n\nThe development server stores its `data` and `logs` in the local directory.\n\n## Logger\n\nUse the following commands to log messages directly to the console and `logs` directory\n\n```javascript\nlog.error('ERROR'); //Error log file\nlog.warn('WARN'); //Info log file\nlog.info('info'); //Info log file\nlog.verbose('verbose'); //Access log file\n```\n\n## Libraries\n\nYou can make changes to the user interface and themes in the `semantic` directory but must rebuild them to take affect.\n\n```bash\ngrunt semantic\n```\n\nTo add libraries to the client website first install them with bower.\n\n```bash\nbower install --save --allow-root jquery\n```\n\nThen add them to `Gruntfile.js` under the `copy:build` task and they be copied to the `/libs/` directory upon build. \n\nAlso make sure you add them to `karma.conf.js` under `files` if you need them to be included in client website testing.\n\n## Testing\n\nYou can execute the automated unit tests either combined or individually for the server and client.\n\n```bash\ngrunt test\ngrunt test:client\ngrunt test:server\n```\n\nTest files should be included in the `server` and `client` directories and use the following filenames.\n\n```bash\n*.mock.js\n*.stub.js\n*.test.js\n*.spec.js\n*.db.js\n```\n\nThe `data` and `logs` directories are not exposed when testing and will be reset after each test run.\n\nYou can also add testing libraries for the client website using bower.\n\n```bash\nbower install --save-dev --allow-root angular-mocks\n```\n\nThen add them to `Gruntfile.js` under the `copy:test` task and they be copied to the `/libs/` directory upon testing. \n\nAlso make sure you add them to `karma.conf.js` under `files` so they are included when testing.\n\n## Distribution\n\nTo compile and archive a production ready distribution build using the following commands.\n\n```bash\ngrunt dist\ngrunt archive\n```\n\nThese files will be generated in the `dist` directory.\n\n- `mean_*.tar.gz` - Compressed version of all the files below.\n- `docker-compose.yml` - Layout for running distribution build with compose.\n- `mean_app.tar` - MongoDB docker image for distribution build.\n- `mean_db.tar` - NodeJS docker image for distribution build.\n- `MongoDB.js` - Executed in MongoDB on database setup.\n- `server.sh` - Start or stop the production server.\n\n## Executing Locally\n\nTo setup and reset your production database use the following command\n\n```bash\ncd dist\n./server.sh reset\n```\n\nUse the `server.sh` file to start and stop your production app within docker.\n\n```bash\n./server.sh start\n./server.sh stop\n```\n\n## Executing Externally\n\nWhen transferred to another host you will need to either pull or load the docker images again and setup the production database.\n\n```bash\nchmod +x server.sh\n\ndocker load \u003c mean_app.tar\ndocker load \u003c mean_db.tar\n\n./server.sh reset\n```\n\nYou can then use the same commands mentioned above to execute the production app.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmlweb%2Fmean-angularjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmlweb%2Fmean-angularjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmlweb%2Fmean-angularjs/lists"}