Computer scienceBackendNode.jsCore ConceptsInternal modulesHTTP serverhttp module

Introduction to the HTTP module

Order the code

Report a typo

You need to create a new server and give a text response with status 200. The text response should be Server is working!.

Sort the lines of code in the correct order.

Put the items in the correct order
});
response.writeHead(200, {'Content-Type': 'text/plain'});
response.write('Server is working!');
const server = http.createServer((request, response) => {
response.end();

Create a free account to access the full topic