вот код index.js:
import express from 'express';
const server = express();
server.get('/', (req, res) => {
return res.send('Hello, Express.js!');
})
const port = 3000;
server.listen(port, () => {
console.log(`Server is running on port ${port}`);
});
вот package.json:
{
"type": "module",
"dependencies": {
"express": "^4.18.1"
}
}