Skip to content

adarsh-2425/simple-node-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple CRUD Node.js App with MongoDB and Pug

This is a basic Node.js application that demonstrates CRUD (Create, Read, Update, Delete) operations. It uses MongoDB as the database and Mongoose ODM for data modeling and interaction. The app is built with the Express framework and renders HTML using Pug templates.

Prerequisites

Before running the app, ensure you have the following installed:

Installation

  1. Clone this repository:

git clone https://github.com/adarsh-2425/simple-node-app.git

  1. Change into the project directory:

cd simple-node-app

  1. Install dependencies:

npm install

Usage

To start the server, run:

npm start

Visit http://localhost:3000 or your hosted address in your browser to access the app.

Functionality

The app allows you to:

  • Create new books with a title, author, genre, and published year.
  • Read the list of existing books.
  • Update book information.
  • Delete books from the collection.

Technology Stack

  • Node.js
  • Express
  • MongoDB
  • Mongoose
  • Pug (formerly known as Jade)

Folder Structure

  • index.js: Entry point of the application.
  • views/: Contains Pug templates for rendering HTML.
  • models/: Defines the Mongoose data model for books.
  • routes/: Contains Express route handlers.

Credits

This project was created as part of a learning exercise and is maintained by Adarsh S.

License

MIT License

Releases

No releases published

Packages

No packages published