Complete the code to import a Node.js module in Deno.
import express from '[1]';
In Deno, to import a Node.js package, you use the npm: prefix.
Complete the code to run a Node.js script in Deno with compatibility.
deno run --compat --unstable [1]To run a Node.js JavaScript file with compatibility, use deno run --compat --unstable followed by the JavaScript file.
Fix the error in the import statement to enable Node.js compatibility in Deno.
import fs from '[1]';
Using node:fs tells Deno to use the Node.js built-in fs module with compatibility.
Fill both blanks to create a Deno script that imports a Node.js package and runs it with compatibility.
import http from '[1]'; await Deno.[2]();
Use node:http to import Node.js HTTP module and serve to start the server.
Fill all three blanks to migrate a Node.js Express app to Deno with compatibility.
import express from '[1]'; const app = express(); app.get('/', (req, [2]) => { [3].send('Hello from Deno with Node.js compatibility!'); });
Import Express with npm:express. The second argument is the response object, commonly named res, used to send the response.
