Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

require in node.js

//What happend when we require a module.
resolving and loading,wrapping,execution,returning exports and final caching.
3 types of module we can import.(core,developer and 3rd party module)
const http= require('http') //core module
const controller = require('./lib/controller') //developer module
const express = require('express') // 3rd party module
Source by velog.io #
 
PREVIOUS NEXT
Tagged: #require
ADD COMMENT
Topic
Name
1+3 =