server.js
import express from 'express';
const server = express();
server.get('/hello', (req, res) => {
res.send('Hello, Coderslang!');
})
export { server };
index.js
import { server } from './server.js';
const port = 8080;
server.listen(port, () => console.log(Waiting for connections on port ${port}
));