Modules
Utilisation d'un module
Importation d'un module standard
const http = require('http');
const dns = require('dns');Importation d'un module provenant d'un package externe
yarn add express # ou npm install --save expressconst express = require('express');Modules "custom"
Création d'un module simple (un seul fichier)
const settings = {
hostname: 'www.wishtack.com',
coolMode: true
};
module.exports = settings;Importation du module
Last updated