Figure out how the program works and change it to make sure that if we open localhost:8080/hello
in the browser, we see the message ‘Hello, Coderslang!’.
Don’t forget to install node modules before running the server!
This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task
index.js
import { server } from './server.js';
const port = 8080;
server.listen(port, () => console.log(`Waiting for connections on port ${port}`));
server.js
import express from 'express';
const server = express();
server.get('/hello', (req, res) => {
res.send('');
})
export { server };