aitnasser / izmjs

Highly maintainable & modular NodeJS starter project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NodeJS, Express and MongoDB starter

David David node npm npm GitHub issues GitHub top language GitHub contributors npm version vulnerabilities PRs Welcome MIT License

Introduction video

Table of Content

Getting started

Using izm CLI

npx izm
# Then follow the wizard

Manual clone

git clone git@github.com:izmjs/izmjs.git new-project
cd new-project
npm i
echo "NODE_ENV=development" > .env/.common.env
cp .example.env .env/.development.env

Optional: Add devtools functional module:

git clone git@github.com:izmjs/devtools.git modules/devtools
npm i

Start the project

npm start

Useful Commands

  • npm start - starts a dev server with nodemon
  • npm test - runs tests with mocha
  • npm run generate:module [name] - generate a new module (Optionnally you can give the name in the command line, otherwise you will be prompted to choose a name.)

VSCode helpers

iam

This shortcut will put a definition of new IAM rules in the file.

iam:route

Will generate a new route

iam:method

Will generate the definition of a method.

ctrl

Create new controller.

module:model

Generate a new mongoose model.

Misc

To skip loading a module, specify it in the env variable SKIP_MODULES

Example

SKIP_MODULES=modules/devtools,modules/data-browser

Auto depmloyment (Gitlab CI)

You need to define these environment variables in your repository:

  • PRODUCTION_URL: The production URL
  • PRODUCTION_DEPLOY_SERVER: List of production servers addresses or IP addresses. Should be separated by ,.
  • PRODUCTION_DEPLOY_PATH: Where to deploy project on production hosts.
  • PRODUCTION_SSH_PRIVATE_KEY: The SSH key to use to connect to production servers.
  • STAGING_URL: The staging URL
  • STAGING_DEPLOY_SERVER: List of staging servers addresses or IP addresses. Should be separated by ,.
  • STAGING_DEPLOY_PATH: Where to deploy project on staging hosts.
  • STAGING_SSH_PRIVATE_KEY: The SSH key to use to connect to staging servers.

License

MIT © Mohamed IDRISSI

About

Highly maintainable & modular NodeJS starter project

License:MIT License


Languages

Language:JavaScript 94.8%Language:Shell 4.2%Language:Dockerfile 0.5%Language:Handlebars 0.4%