MEAN Stacker is a MEAN stack starter kit.
MEAN Stacker is a MEAN stack starter kit.
- Angular Style Guide compliant
- Behavior-driven unit testing with Jasmine and Karma
- Bootstrap 3 support using
bootstrap-sass
andngx-bootstrap
- Code Coverage with Istanbul and
nyc
- Dockerized:
- Docker for local development with hot-reloading support
- Multistage Dockerfile to separate build from production images
- Docker Compose support enabled
- E2E testing using Protractor
- Express.js security with HTTP headers using Helmet middleware
- i18n/l10n support using
ngx-translate
- Linters for TypeScript (TsLint), Angular (Codelyzer) and Sass (
sass-lint
) - Node Express server used to pass requests to Angular client
- Rate-limiting middleware with Express Rate Limit
- Server Side Rendering with Angular Universal
Your system will need access to;
./run -i
# or
./run --install
# If you just want to (re)build and start
# a docker container locally, just use:
npm run docker:start
# build new docker image (pure docker build, app must be pre-built):
npm run docker:build:prod
npm run docker:build
# commit changes to new docker image:
npm run docker:commit
# kill docker container:
npm run docker:kill
# remove docker container and image:
npm run docker:remove
# remove docker container:
npm run docker:rm
# remove docker image:
npm run docker:rmi
# run new docker container:
npm run docker:run
# build new docker image and run new container:
npm run docker:start:prod
npm run docker:start
# run docker test image:
npm run docker:test
There is a RUN CLI for performing various application operations.
It is accessible via a script in the root directory; sh ./run
This script is able to control most actions, from
setting ENV variables to building and deploying the application.
# SPECIAL NOTE:
# `ENV` arguments can be provided as below on all commands.
./run --env=[ DEV | UAT | PROD | ... ]
# Install, Build, Test, E2E:
./run -ci
# Reporting:
./run --report
# Publish:
./run --publish
# Upload, Deploy:
./run --upload --deploy
./run -u -d
# SEMVER increment (will also run git-commit/tag/push):
./run --semver=[patch|minor|major]
# Debug the run script
./run --debug --ci -u -d --semver=patch
# After Git-Pull:
./run --clean --install
# Before Git-Push/Pull-Request:
./run --clean --ci
# After Pull-Request-Merge (increment 'develop' branch):
./run --semver=patch
# For CI/CD Pipeline:
./run --clean --ci --report --e2e --publish
# After Deploy-to-Production (increment 'develop' branch):
./run --semver=minor
# Run the shell script, with options
./run \
#
# Turn on debug mode
#
--debug
#
# Set the ENV [local, dev, uat, prod]
#
--env=*
#
# Clean existing application build/test files
#
--clean
#
# Continuous Integration (CI)
# ...Install, Build, Test, E2E
#
--ci
#
# Install the application
#
-i, --install
#
# Build/compile application
#
-b, --build
#
# Compile documentation
#
--docs
#
# Run lint/unit/integration/mock tests
#
-t, --test
#
# Run Reporting
#
# Codecov.io requires:
# - 'CODECOV_TOKEN' env var
#
# SONAR scanner/reporting requires:
# - 'SONAR_SCANNER_PATH' env var
# - 'SONAR_SERVER_URL' env var
# - 'sonar-project.properties' file
#
-r, --report
#
# Start the application
#
-s, --start
#
# Run End-to-End tests
# - running e2e will automatically start (-s) the app
#
--e2e
#
# Increment the application version using SEMVER
# Value is appended to `semver -i` command
# See: https://github.com/npm/node-semver
#
--semver=*
#
# Publish the application (with NPM, etc.)
#
-p, --publish
#
# Push/upload the application (to AWS ECR/S3, respectively)
#
-u, --upload
#
# Deploy the application (with AWS Elastic Beanstalk)
#
-d, --deploy
☝️ more instructions coming soon.
Copyright (c) 2018 Sean Trane Sciarrone