Skip to content

Purvik/NodeJS-Samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS-Samples

  • Developed As Demo Project to Learn NodeJs with MongoDB, Express, Mongoose

Create a Project

  • create a directory with your desired project name using command

    mkdir demoApp1

  • switch to that folder using

    cd demoApp1

  • execute command

    npm init

    This will take basic information for our required project like name, author, git link etc while creating package.jason file. All the information that you provide here will be there in package.json file.

Installation of Required Components/Libraries/Modules

Open the CMD and go to your project folder locatoin then execute below commands,

  • To install required paKages

    npm install mongoose --save

    npm install express --save

    npm install body-parser --save

  • For execution of our project on Save Changes install nodemon using command,

    npm install nodeman -g

  • To Run this Project first time (your default entry file app.js or index.js)

    node app.js or nodemon

    If you start you application using nodemon there no need to rerun project using command, when you save your changes it'll automatically restart it. Else if you want to restart using terminal use rs to execute. It'll do so.

    To Get out of executiuon press ctrl+C and input y -> ENTER.

About

NodeJS Projects using MongoDB & Express

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published