From 8cff0c80d6775558cbfe07dc4c186bc0c27c2985 Mon Sep 17 00:00:00 2001 From: Hagop Jamkojian Date: Sat, 26 Dec 2020 11:06:50 +0200 Subject: [PATCH] Update README.md --- CONTRIBUTING.md | 3 +- README.md | 74 ++++++++++++++++++++++++++++++------------------- package.json | 2 +- 3 files changed, 48 insertions(+), 31 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1e6ad439..1ee851b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ If you have an awesome new feature that you want to implement or you found a bug - **Create an issue** to explain and discuss the details - **Fork the repo** -- **Clone the repo** and set it up (check out the [getting started](https://github.com/hagopj13/node-express-mongoose-boilerplate#getting-started) section in README.md) +- **Clone the repo** and set it up (check out the [manual installation](https://github.com/hagopj13/node-express-mongoose-boilerplate#manual-installation) section in README.md) - **Implement** the necessary changes - **Create tests** to keep the code coverage high - **Send a pull request** @@ -26,6 +26,7 @@ If you have an awesome new feature that you want to implement or you found a bug ### Coding style guide We are using ESLint to ensure a consistent code style in the project, based on [Airbnb's JS style guide](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base). + Some other ESLint plugins are also being used, such as the [Prettier](https://github.com/prettier/eslint-plugin-prettier) and [Jest](https://github.com/jest-community/eslint-plugin-jest) plugins. Please make sure that the code you are pushing conforms to the style guides mentioned above. diff --git a/README.md b/README.md index 8f24386d..503d72d1 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,54 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/2ab03f5d62a1404f87a659afe8d6d5de)](https://www.codacy.com/manual/hagopj13/node-express-mongoose-boilerplate?utm_source=github.com&utm_medium=referral&utm_content=hagopj13/node-express-mongoose-boilerplate&utm_campaign=Badge_Grade) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) -A boilerplate/starter project for quickly building production-ready RESTful APIs using Node.js, Express, and Mongoose. +A boilerplate/starter project for quickly building RESTful APIs using Node.js, Express, and Mongoose. -It comes with many built-in features, such as authentication using JWT, request validation, unit and integration tests, continuous integration, docker support, API documentation, pagination, etc. For more details about the features, check the list below. +By running a single command, you will get a production-ready Node.js app installed and fully configured on your machine. The app comes with many built-in features, such as authentication using JWT, request validation, unit and integration tests, continuous integration, docker support, API documentation, pagination, etc. For more details, check the features list below. + +## Quick Start + +To create a Node.js project, simply run: + +```bash +npx create-nodejs-express-app +``` + +Or + +```bash +npm init nodejs-express-app +``` + +## Manual Installation + +If you would still prefer to do the installation manually, follow these steps: + +Clone the repo: + +```bash +git clone --depth 1 https://github.com/hagopj13/node-express-mongoose-boilerplate.git +cd node-express-mongoose-boilerplate +npx rimraf ./.git +``` + +Install the dependencies: + +```bash +yarn install +``` + +Set the environment variables: + +```bash +cp .env.example .env + +# open .env and modify the environment variables (if needed) +``` ## Table of Contents - [Features](#features) -- [Getting Started](#getting-started) +- [Commands](#commands) - [Project Structure](#project-structure) - [API Documentation](#api-documentation) - [Error Handling](#error-handling) @@ -22,6 +62,7 @@ It comes with many built-in features, such as authentication using JWT, request - [Logging](#logging) - [Custom Mongoose Plugins](#custom-mongoose-plugins) - [Linting](#linting) +- [Contributing](#contributing) ## Features @@ -48,32 +89,7 @@ It comes with many built-in features, such as authentication using JWT, request - **Linting**: with [ESLint](https://eslint.org) and [Prettier](https://prettier.io) - **Editor config**: consistent editor configuration using [EditorConfig](https://editorconfig.org) -## Getting Started - -### Installation - -Clone the repo: - -```bash -git clone https://github.com/hagopj13/node-express-mongoose-boilerplate.git -cd node-express-mongoose-boilerplate -``` - -Install the dependencies: - -```bash -yarn install -``` - -Set the environment variables: - -```bash -cp .env.example .env - -# open .env and modify the environment variables (if needed) -``` - -### Commands +## Commands Running locally: diff --git a/package.json b/package.json index a081b2a8..2cab9358 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "create-nodejs-express-app", "version": "1.5.0", - "description": "A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose", + "description": "Create a Node.js app for building production-ready RESTful APIs using Express, by running one command", "bin": "bin/createNodejsApp.js", "main": "src/index.js", "repository": "https://github.com/hagopj13/node-express-mongoose-boilerplate.git",