Skip to content

Nguyenkhanh98/nestjs-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

Structure

Node.js Best Practices

Function

  1. Dynamic import
  2. Authenticate
    • Config jwt like OAuth ( access-token, refresh-token )
    • OAuth Google
    • OAuth Facebook
  3. Dump database
    • Child process
  4. Logger
    • NestJs
    • Wiston
  5. Send mail
    • Nodemailer
  6. Payment
    • Stripe
  7. Task scheduler
    • Timeout
    • Interval
    • Cron
  8. Translate
    • Google translate
  9. Upload file
    • Cloudinary
    • Fs createWriteStream to folder static
  10. Test
    • Unit
    • E2e
    • Coverage

Usage

  1. Clone repository
  git clone https://github.com/chnirt/nestjs-graphql-best-practice.git
  1. Cd into directory
  cd nestjs-graphql-best-practice/
  1. Create .env
  touch .env
  1. Add to .env
  PORT=<yourport>
  1. Install dependencies using npm
  npm i

7. Performance Best Practices

Our contributors are working on this section. Would you like to join?

[✔️] 7.1. Prefer native JS methods over user-land utils like Lodash

[❔] 7.2. Use Fastify in place of Express