<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>http://wiki.enunpimpam.com/pimpamwiki/index.php?action=history&amp;feed=atom&amp;title=Importar_json_mongoBD</id>
	<title>Importar json mongoBD - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.enunpimpam.com/pimpamwiki/index.php?action=history&amp;feed=atom&amp;title=Importar_json_mongoBD"/>
	<link rel="alternate" type="text/html" href="http://wiki.enunpimpam.com/pimpamwiki/index.php?title=Importar_json_mongoBD&amp;action=history"/>
	<updated>2026-04-06T01:43:02Z</updated>
	<subtitle>Historial de revisiones de esta página en el wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>http://wiki.enunpimpam.com/pimpamwiki/index.php?title=Importar_json_mongoBD&amp;diff=1093&amp;oldid=prev</id>
		<title>Nacho en 09:43 10 sep 2020</title>
		<link rel="alternate" type="text/html" href="http://wiki.enunpimpam.com/pimpamwiki/index.php?title=Importar_json_mongoBD&amp;diff=1093&amp;oldid=prev"/>
		<updated>2020-09-10T09:43:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;es&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisión del 09:43 10 sep 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot; &gt;Línea 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{obejtos}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{obejtos}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;]&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;]&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ejecutar el archivo app.js&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; node App.js&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nacho</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.enunpimpam.com/pimpamwiki/index.php?title=Importar_json_mongoBD&amp;diff=1092&amp;oldid=prev</id>
		<title>Nacho en 09:42 10 sep 2020</title>
		<link rel="alternate" type="text/html" href="http://wiki.enunpimpam.com/pimpamwiki/index.php?title=Importar_json_mongoBD&amp;diff=1092&amp;oldid=prev"/>
		<updated>2020-09-10T09:42:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;es&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisión del 09:42 10 sep 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Línea 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Categoría:React]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;en App.js&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;en App.js&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nacho</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.enunpimpam.com/pimpamwiki/index.php?title=Importar_json_mongoBD&amp;diff=1091&amp;oldid=prev</id>
		<title>Nacho: Página creada con «en App.js &lt;syntaxhighlight lang=&quot;js&quot;&gt;  const fotakus = require ('./2001') const mongoose = require('mongoose');  // mongoose.connect(&quot;mongodb://localhost:27017/nasaDB&quot;, { u…»</title>
		<link rel="alternate" type="text/html" href="http://wiki.enunpimpam.com/pimpamwiki/index.php?title=Importar_json_mongoBD&amp;diff=1091&amp;oldid=prev"/>
		<updated>2020-09-10T09:41:57Z</updated>

		<summary type="html">&lt;p&gt;Página creada con «en App.js &amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt;  const fotakus = require (&amp;#039;./2001&amp;#039;) const mongoose = require(&amp;#039;mongoose&amp;#039;);  // mongoose.connect(&amp;quot;mongodb://localhost:27017/nasaDB&amp;quot;, { u…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;en App.js&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt; &lt;br /&gt;
const fotakus = require ('./2001')&lt;br /&gt;
const mongoose = require('mongoose');&lt;br /&gt;
&lt;br /&gt;
// mongoose.connect(&amp;quot;mongodb://localhost:27017/nasaDB&amp;quot;, { useUnifiedTopology: true, useNewUrlParser: true });&lt;br /&gt;
&lt;br /&gt;
mongoose.connect('mongodb+srv://nacho:klingon@cluster0.ldmkf.mongodb.net/nasaDB?retryWrites=true&amp;amp;w=majority', { useNewUrlParser: true, useUnifiedTopology: true })&lt;br /&gt;
&lt;br /&gt;
const fotosSchema = new mongoose.Schema({&lt;br /&gt;
  date: Date,&lt;br /&gt;
  explanation: String,&lt;br /&gt;
  hdurl: String,&lt;br /&gt;
  media_type: String,&lt;br /&gt;
  service_version: String,&lt;br /&gt;
  title: String,&lt;br /&gt;
  url: String&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
const Foto = mongoose.model(&amp;quot;Foto&amp;quot;, fotosSchema);&lt;br /&gt;
&lt;br /&gt;
console.log(fotakus)&lt;br /&gt;
&lt;br /&gt;
Foto.insertMany(fotakus, function (error) {&lt;br /&gt;
  if (error) {&lt;br /&gt;
    console.log(error)&lt;br /&gt;
  } else {&lt;br /&gt;
    console.log(&amp;quot;Se añadieron items nuevos&amp;quot;)&lt;br /&gt;
  }&lt;br /&gt;
})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Archivo json&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot;&amp;gt; &lt;br /&gt;
module.exports = [&lt;br /&gt;
{obejtos}&lt;br /&gt;
]&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nacho</name></author>
		
	</entry>
</feed>