1.15.4 • Published 1 year ago

create-meh-app v1.15.4

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

Create MEH App

Quickly scaffold a new Node.js project by creating a GitLab repository, setting up linting/formatting, automatic Kubernetes deployment, local dotenv ⇄ Kubernetes secrets syncing, and more.

Usage

yarn create meh-app <app-name>

Examples:

yarn create meh-app my-app
yarn create meh-app relative-folder/my-app
yarn create meh-app /root-folder/my-app

Features

  • Creates and clones a GitLab project and repository
  • Initial scaffold commit on master and develop
  • Automatic Kubernetes deployment through GitLab
  • Two-way dotenv/secrets sync through yarn upload-env and yarn download-env
  • Lints & formats .js(x), .ts(x), and .vue files on commit
  • Formats .graphql, .html, .json, .md, .(s)css, and .yml files on commit
  • Optional Airflow DAG(s) (automatic deployment through GitLab)
  • Optional Redis and/or MongoDB database
  • Optional Uptime Robot monitoring

Prerequisites

Recommended: Add export GITLAB_PERSONAL_ACCESS_TOKEN=<token> to your ~/.bash_profile (and/or ~/.zshrc) so you can use yarn download-env and yarn upload-env without configuration.

Functionality

yarn upload-env

Converts any local .env.<test|acc|prod> files to secrets, and applies them remotely through kubectl. Add the --restart or -r flag to restart any web pods afterwards (to pick up your new secrets).

Requires a GITLAB_PERSONAL_ACCESS_TOKEN as environment variable.

yarn download-env

Converts any remote project secrets to local dotenv files, and stores them as .env.<test|acc|prod>. Add the --force or -f flag to overwrite any pre-existing .env.<test|acc|prod> files.

Requires a GITLAB_PERSONAL_ACCESS_TOKEN as environment variable.

pre-commit git hook

  • Lints (and formats), and attempts to autofix your staged (.js(x), .ts(x), and .vue) files through ESLint (extending Airbnb and Prettier)
  • Formats and attempts to autoformat your staged (.graphql, .html, .json, .md, .(s)css, and .yml) files through Prettier

pre-push git hook

  • Runs yarn test

Airflow DAGs

If you opted in for Airflow DAG(s) during setup, the following will be added to your project:

  • /airflow/<dagName>.py (containing the interval and description you entered)
  • "start:<dagName>" script in package.json (the Airflow pod will run yarn start:<dagName>)
  • Automatic deployment of any /airflow/*.py files, when pushing to the master branch

Recommended Visual Studio Code settings

Extensions

settings.json

To open these settings, press: ⌘-Shift-P → "Preferences: Open Settings (JSON)"

{
  "editor.codeActionsOnSave": { "source.fixAll": true },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,
  "editor.tabSize": 2,
  "eslint.options": { "ignorePath": ".gitignore" },
  "files.insertFinalNewline": true,
  "files.trimTrailingWhitespace": true,
  "prettier.disableLanguages": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
  "prettier.ignorePath": ".gitignore"
}

Note: We use prettier.disableLanguages to disable Prettier from handling JS(X) and TS(X) files, because ESLint already formats these (using Prettier under the hood).

Roadmap

  • Dotenv ⇄ secrets sync without a cluster key
  • DAG OTAP
1.15.4

1 year ago

1.15.3

3 years ago

1.15.2

3 years ago

1.15.1

3 years ago

1.15.0

3 years ago

1.14.4

3 years ago

1.14.2

4 years ago

1.14.1

4 years ago

1.14.0

4 years ago

1.13.0

4 years ago

1.12.0

4 years ago

1.11.4

4 years ago

1.11.3

4 years ago

1.11.2

4 years ago

1.11.1

4 years ago

1.11.0

4 years ago

1.10.1

4 years ago

1.10.0

4 years ago

1.9.3

4 years ago

1.9.2

4 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.8.4

4 years ago

1.8.3

4 years ago

1.8.2

4 years ago

1.8.0

4 years ago

1.7.2

4 years ago

1.7.1

4 years ago

1.6.0

4 years ago

1.5.3

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago