Installing and Setting Up Mongoose

Hey Guys!
I’m stuck in this course (edit: because FCC isn’t capable to check
// running tests
“mongodb” dependency should be in package.json
“mongoose” dependency should be in package.json
“mongoose” should be connected to a database
// tests completed
I’d added
"fcc-express-bground": ""
to the package.json and also,

if (!process.env.DISABLE_XORIGIN) {
  app.use(function(req, res, next) {
    var allowedOrigins = ['', ''];
    var origin = req.headers.origin || '*';
    if(!process.env.XORIG_RESTRICT || allowedOrigins.indexOf(origin) > -1){
         res.setHeader('Access-Control-Allow-Origin', origin);
         res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");

const port = 3000;
bGround.setupBackgroundApp(app, myApp, __dirname).listen(port, function(){
  bGround.log('Node is listening on port '+ port + '...')

All work fine on the browser.
Anyone can help me?

Welcome, gonchileon.

I have moved your post to a new topic, because it involves your own project/issue, and the thread you replied to was old/outdated.

Would you mind sharing a link to your project code? It is difficult to see what is going on with the current code.

1 Like

Here is:

What is the challenge url you are working on? It appears you may not be using the most current boilerplate.

1 Like

Doesn’t look like the correct starter project

Here is the starter project link from the intro page

1 Like

I tried with that starter project, and it works.
I’ll compare with mine and check why didn’t work.