Use the .env File fail!

Tell us what’s happening:
Describe your issue in detail here.

can’t finish my challenge !

my code is working in replit but don’t in solution link

my code:
var express = require(‘express’);
var app = express();

if(process.env.MESSAGE_STYLE == ‘uppercase’) {
res.json({“message”: ‘HELLO JSON!’});
else {
res.json({“message”: ‘Hello json!’});


module.exports = app;

freecodecamp is full bugs?

Your project link(s)


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36

Challenge: Use the .env File

Link to the challenge:

Welcome there,

Take a close look at the expected response from your app:

The response object should either be {"message": "Hello json"} or {"message": "HELLO JSON"}

Hope this clarifies

Thanks for respond me but do not work yet?

work in muy replit!

best regard

It looks like you are still returning the wrong messages. You shouldn’t have exclamation points.

Thanks !

Working ! but what was the problem ? because if work in replit but not in freecodecamp it create confution!

I don’t understand. If you fixed it, then you should be able to see the problem? The text you were returning was not exactly, character for character identical to the requirements. The tests fail without on exact match.


it seem some triky! but thanks for you help!

I will continue! :smiley:

1 Like

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