(Part One) - Intro
Version : 0.0.1(20190301)
Author :
Ing. Duván Albeiro Mejia Cortes (software.bugs.io@gmail.com)
Objective:
In this short course(tutorial) we are going to build a NodeJS web application that uses JavaScript and MongoDB.
Note: This is the first part of the tutorial.
Software Requirements:
Bellow there is the list of the required Software to build and run JavaScript Web Application.
Programming languages:
- JavaScript
- NodeJS v11.10.1
Integrated Development Environment (IDE):
- Visual Studio code (Version 1.31)
Web Application Server:
- Express
Databases:
- MongoDB(NoSQL)
(Part two - Crud NodeJS with Mongo DB)
Versión : 0.1.1(20190303)
Author :
Ing. Duván Albeiro Mejia Cortes (software.bugs.io@gmail.com)
Objective:
In this short course (tutorial) we are going to build a Crud NodeJS web application with one NoSQL (MongoDB). To access the database we will use JavaScript programming language. Also we will build a server uses NodeJS.
Note: This is the Second part of the tutorial.
Download the crud-nodejs-mongodb folder:
Clone this repository
git clone https://github.com/DuvanSGF/NodeJS.git
Or download the zip file and unpack it:
https://github.com/DuvanSGF/NodeJS/archive/master.zip/
unzip master.zip
To create a database in MongoDB, use the mongod.exe command in a terminal to start (run) the server
This terminal windows must be kept open. if you close this console, you kill the MongoDB server process (stops the server).
To run the MongoDB client, open a new terminal windows and execute the mongo.exe command.
NodeJS web application will create the database and the collection.
Inside crud-nodejs-mongo-db folder you must open the terminal and run the following command into the terminal.
$ npm init --yes
Express.js, or simply Express, is a web application framework for Node.js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs.[3] It has been called the de facto standard server framework for Node.js.[4]
$ npm install express
Mongoose is an object data modeling (ODM) library that provides a rigorous modeling environment for your data, enforcing structure as needed while still maintaining the flexibility that makes MongoDB powerful.
$ npm install mongoose
EJS is a simple templating language that lets you generate HTML markup with plain JavaScript.
$ npm install ejs
HTTP request logger middleware for node.js.
$ npm install morgan
Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Perfect for development. Install it using npm. Just use nodemon instead of node to run your code, and now your process will automatically restart when your code changes.
$ npm i nodemon -D
Before you need to do the step One .
To run the Express server you need to execute the following command in a terminal.
$ npm run dev
To test the Express server open the web service URL in a browser:
or
MIT, as the original project. See MIT License.