Created by CyanHall.com on 11/21/2020 , Last updated: 04/30/2021.
πŸ‘‰Β Β github shields Star me if it’s helpful.

1. Installation

    $ npm i -g @nestjs/cli
$ nest new project-name
  

2. Lifecycle events

    onModuleInit()
onApplicationBootstrap()
onModuleDestroy()
beforeApplicationShutdown()
onApplicationShutdown()
  

3. next.config.js

    const path = require('path');

module.exports = {
  webpack (config) {
    // Module import alias
    config.resolve.alias['~'] = path.resolve(__dirname, `.`);
    return config;
  }
}


import Layout from "~/components/layout"
  

4. Link with className

    <Link href="/">
  <a className="foo" target="_blank" rel="noopener noreferrer">
    Hello World
  </a>
</Link>
  

5. Render HTML

    <div dangerouslySetInnerHTML={{ __html: postData.contentHtml }} />
  

1. Installation

    $ npm i -g @nestjs/cli
$ nest new project-name
  

3. next.config.js

    const path = require('path');

module.exports = {
  webpack (config) {
    // Module import alias
    config.resolve.alias['~'] = path.resolve(__dirname, `.`);
    return config;
  }
}


import Layout from "~/components/layout"
  

5. Render HTML

    <div dangerouslySetInnerHTML={{ __html: postData.contentHtml }} />
  

2. Lifecycle events

    onModuleInit()
onApplicationBootstrap()
onModuleDestroy()
beforeApplicationShutdown()
onApplicationShutdown()
  

4. Link with className

    <Link href="/">
  <a className="foo" target="_blank" rel="noopener noreferrer">
    Hello World
  </a>
</Link>
  


Maitained byΒ Cyanhall.com, Copy Rights @ CC BY-NC-SA 4.0