I just started working on the Quote API project from the back end development path. And I’m trying to run in on my own PC but when I load the localhost:4001 page it just logs “Cannot get /” in the browser. But the same code does run in the codecademy envirement. I can always just finish it on codecademy but I prefer working in VSCODE. Thank for the help in advance. This is the code I’m running:
const express = require(‘express’);
const morgan = require(‘morgan’);
const app = express();
const { quotes } = require(‘./data’);
const { getRandomElement } = require(‘./utils’);
const PORT = process.env.PORT || 4001;
app.use(express.static(‘public’));
app.listen(PORT, () => {
console.log(Listening on ${PORT}
)
})
Keep in my mind is does work on codecademy but not in my own browser. I just the npm install command before hand and in the console it does log that it is listening on the port.