Reputation: 748
I have an express app and react, express connected to react with proxy. I have added data to mongodb from express
var HeaderSection = require('../../models/sections/header_SC');
var mongoose = require('mongoose');
var headerSc = [
new HeaderSection ({
imagePath:
'',
title:
'Odelia Revivo',
description:
'- Makeup Artist -',
buttonText:
'צרו קשר'
})];
How can I get this data from React?
Upvotes: 0
Views: 339
Reputation: 343
You can use HeaderSection.find({your query here}) to fetch the data from the MongoDB
Upvotes: 2