Hello Express Wont Print

Hey everyone, I am at the Start a Working Express Server section and the Hello Express Code is not showing up. I tried some solution but it wont show.

Here is my code:

var express = require(‘express’);
var app = express();
var router = express ();

console.log(‘Hello World’);

app.get("/", function(req, res) {
res.send(“Hello Express”);

module.exports = router;
module.export = app;

Correct the second module.exports (it should be exports not export)

module.exports = app;

I would also remove the router export before it.

Thanks fo the help. Sometimes the smallest things stop your code from working lol

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.