What is wrong? help

Tell us what’s happening:

Your project link(s)

solution: https://boilerplate-express-5.kalebelopes.repl.co/json

var express = require('express');
var app = express();

// app.get('/', (req, res) => {
//   res.send('Hello Express')
// } )

// app.use('/public', express.static(__dirname + "/public"));

// app.get('/', (req, res) => {
//   res.sendFile(__dirname + "/views/");
// })

app.get('/json', function(req,res) {
  if(process.env.MESSAGE_STYLE === "uppercase") {
      "message": "HELLO JSON"
      "message": "hello json"

module.exports = app;

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36.

Challenge: Use the .env File

Link to the challenge:

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

1 Like

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