Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

249
Views
I want to run my server in nodemon but I get an error

But I get an error saying this module.export is not a function in git bash I will add more information about the problem if needed

//Schema code

const Mongoose = require("mongoose");

const users = new Mongoose.Schema(

{fName:{type:String, required:true},favFoode:String,age:Number});

const user1 = Mongoose.model("user",users)

module.exports(user1)

//Server code

const express = require("express");

const app = express()

require("./db")

require("./module/users")

app.use(express.json());

app.listen(200, ()=>{

console.log("This server is working");

})
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

you should assign the user1 variable to module.exports, like this:

module.exports = user1

Here is more information about Node.js modules: Node.js API Modules

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!