Code Monkey home page Code Monkey logo

newbie's Introduction

GitHub License Commitizen friendly GitHub package.json dependency version (prod) GitHub package.json dependency version (prod)

πŸ“– Description

Newbie is a Node.js project development framework based on NestJS.

Nest Logo

πŸ›  Setup environment

Install Node.js

| Follow the guide https://blog.csdn.net/worldzhy/article/details/105092560

| Do not update these node packages:

  • "@elastic/elasticsearch": "^7.13.0"
  • "cache-manager": "^4.1.0"
  • "cache-manager-redis-store": "^2.0.0"

Install pm2

npm i -g pm2

https://pm2.io/

Install NestJS

npm i -g @nestjs/cli

https://docs.nestjs.com/first-steps

πŸ‘©β€πŸ’» Develop

Install dependencies

$ npm i
$ cp .env.example .env

Install database

$ npx prisma generate
$ npx prisma db push
$ npx prisma db seed

Install husky

$ npm i --save-dev husky commitizen @commitlint/{cli,config-conventional}
$ npx husky init
$ npx commitizen init cz-conventional-changelog --save-dev --save-exact
$ echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js

Set version

$npm version major
$npm version minor
$npm version patch

Start application

$ npm run dev

πŸ’» Production

Install dependencies

$ npm i --omit=dev
$ npm i --save-dev tsconfig-paths
$ cp .env.example .env

Install database

$ npx prisma generate
$ npx prisma db push
$ npx prisma db seed

Start application

$ npm run build
$ pm2 start npm --name newbie -- start

Restart application

$ pm2 stop newbie
$ npm run build
$ pm2 start newbie

πŸ“„ License

Newbie is MIT licensed.

newbie's People

Contributors

worldzhy avatar chuckdog avatar ijborda avatar snyk-bot avatar

Stargazers

 avatar  avatar 子慕倧诗人 avatar

Watchers

子慕倧诗人 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.