Skip to content

A simple CRUD web application to manage a contact book using Node.js and Express.

Notifications You must be signed in to change notification settings

mag-z/contact-book-ExpressApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

contact-book-ExpressApp

A simple CRUD web application to manage a contact book using Node.js and Express.

Update

As of 1/14/2024:

  1. Used friends-data.js to populate the app. In the future, will try to use MongoDB.
  2. Add Friend feature will be developed in the future. Only the page is rendering using the EJS view engine.

Table of Contents

ALAB 318.2.1 Features

  1. View templates include:
    • Home page to display a table of all friends' contact info.
    • Add friend page.
    • Gallery page.
  2. Router parameter used friend id /friends/:id to return a friend's details in JSON.
  3. A button to use res.download method to download a gallery picture.

Preview

ALAB 318.2.1 Preview ALAB 318.2.1 Preview ALAB 318.2.1 Preview ALAB 318.2.1 Preview ALAB 318.2.1 Preview

Features

  • Add, edit, and delete contacts.
  • View a gallery of images.

Project Structure

/project-root
  /routes
    routes.js
  /views
    /layout
        header.ejs
        footer.ejs
    add_friend.ejs
    gallery.ejs
    index.ejs
  /images
    squad.jpg
  /data
    friends-data.js
  main.js
  .env
  .gitignore
  README.md

Installation

Clone the repository:

git clone <repository-url>

Install dependencies:

npm install

Usage

Start the application:

npm start

Visit http://localhost:3000 in your web browser.

Routes

  1. Home Page:

    • URL: http://localhost:3000/
    • Description: Displays a table of all friends' contact information.
    • Template: index.ejs
  2. Friend Details by ID:

  3. Add Friend Page:

  4. Gallery Page:

  5. Download Image:

About

A simple CRUD web application to manage a contact book using Node.js and Express.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published