skip to Main Content

ReactJS, NodeJS, MongoDB, Backend

in index.js, const express = require("express") const mongoose = require("mongoose") const cors = require("cors") const CustomerModel = require('./models/Customer') const app = express() app.use(express.json()) app.use(cors()) mongoose.connect("mongodb://localhost:27017/customer") app.post("/login", (req, res) => { const {email, password} = req.body CustomerModel.findOne({email: email}) .then(user => {…

VIEW QUESTION
Back To Top
Search