-2

I want to make website on books using mean stack so I want to store contents of books now I don't know where I have to store all those content in database or somewhere else.

worst_coder
  • 17
  • 1
  • 7
  • You store it in the database, MongoDB, which is the M in MEAN. What is unclear?! – jonrsharpe Sep 05 '16 at 06:40
  • You can use this yeoman generator to quickly get started with the MEAN stack. If you generate a project you can see how the database is being used. https://github.com/angular-fullstack/generator-angular-fullstack – Amygdaloideum Sep 05 '16 at 06:43

1 Answers1

0

The easiest way is to import a CSV file. MongoDB can import CSV files directly:

In the following example, mongoimport imports the csv formatted data in the /opt/backups/contacts.csv file into the collection contacts in the users database on the MongoDB instance running on the localhost port numbered 27017.

Specifying --headerline instructs mongoimport to determine the name of the fields using the first line in the CSV file.

mongoimport --db users --collection contacts --type csv --headerline --file /opt/backups/contacts.csv

Source: https://docs.mongodb.com/manual/reference/program/mongoimport/

See also: How to use mongoimport to import csv

Community
  • 1
  • 1
Ben
  • 23
  • 5