0

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?

1
  • I'm not sure I understand what you want to achieve, but couldn't you just use HeaderSection.find() to fetch the data from the DB since you have the model required Commented Apr 15, 2018 at 15:41

1 Answer 1

2

You can use HeaderSection.find({your query here}) to fetch the data from the MongoDB

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.