executando = const http = require('http');
const server = http.createserver((request,response)=>{ response.writeHead(200,{'Content-Type':'text-html'}); response.write('
Hello!
'); });server.listen(3000);
Log do console=
SyntaxError: Cannot use import statement outside a module at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1032:15) at Module.compile (node:internal/modules/cjs/loader:1067:27) at Object.Module.extensions..js (node:internal/modules/cjs/loader:1155:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module.load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/runmain:77:12) at node:internal/main/run_main_module:17:47