diff --git a/README-DB.md b/README-DB.md new file mode 100644 index 0000000..e69de29 diff --git a/README-FF.md b/README-FF.md new file mode 100644 index 0000000..ba2354a --- /dev/null +++ b/README-FF.md @@ -0,0 +1 @@ +este es otro archivo readme ff \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..25d17d8 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +Instalar node js en Windows + +Descarga el instalador: + +Ve al sitio oficial de Node.js: Node.js. https://nodejs.org/en/download/package-manager + +Selecciona el instalador para Windows (archivo .msi) según si tu sistema es de 64 bits o 32 bits. + +Haz clic en Siguiente para comenzar la instalación12. + +Ejecuta el instalador: + +Abre el archivo descargado (.msi). + +Sigue las instrucciones del instalador, aceptando la licencia y seleccionando la ubicación de instalación. + +Una vez completada la instalación, tendrás acceso al programa ejecutable node en la línea de comando + + +abrir terminal +node -v +npm -v + +INSTALL +======= + + +npm i express + +npm i nodemon -D +npm run start +npm mongoose diff --git a/readme--lll.md b/readme--lll.md new file mode 100644 index 0000000..e69de29 diff --git a/readme2--lll.cd b/readme2--lll.cd new file mode 100644 index 0000000..e69de29 diff --git a/readme3--lll.cd b/readme3--lll.cd new file mode 100644 index 0000000..e69de29 diff --git a/request.http b/request.http index b81f545..8b609b4 100644 --- a/request.http +++ b/request.http @@ -3,7 +3,7 @@ POST http://localhost:9000/api/users HTTP/1.1 Content-Type: application/json { - "name": "Nikola Tesla", + "name": "Nikola Tesla UNI", "age": 80, "email": "nikolatesla@email.com" } diff --git a/src/index.js b/src/index.js index 62935ba..1226691 100644 --- a/src/index.js +++ b/src/index.js @@ -17,10 +17,11 @@ app.get("/", (req, res) => { }); // mongodb connection -mongoose - .connect(process.env.MONGODB_URI) - .then(() => console.log("Connected to MongoDB Atlas")) - .catch((error) => console.error(error)); +//mongoose +// .connect(process.env.MONGODB_URI) +// .then(() => console.log("Connected to MongoDB Atlas")) +// .catch((error) => console.error(error)); +mongoose.connect("mongodb+src://"); // server listening app.listen(port, () => console.log("Server listening to", port));