import http from "http";
const PORT = 3000
const server = http.createServer((req,res) => {
res. writeHead(200,{"content-type": "text/plain"});
res. end("Curso de Node.js");
});
server.listen(PORT, () => {``
console.log("servidor escutando!");
undefined
});
PS C:\Users\lilic\express Mongo> node server.js
he .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
C:\Users\lilic\express Mongo\server.js:1
import http from "http";
^^^^^^
Esta aparecendo esse erro no terminal.