import node module code example
Example 1: node package.json type module
node --experimental-modules app.js
Example 2: how to import in node
const http = require('http');
const { router } = require('./routes');
node --experimental-modules app.js
const http = require('http');
const { router } = require('./routes');