Skip to content

A full-stack web application for managing articles with CRUD operations. using nodejs and express.

Notifications You must be signed in to change notification settings

MoAjabali/articles-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Articles Management System

Node.js Express MongoDB EJS Bootstrap

A full-stack web application for managing articles with CRUD operations.

📋 Table of Contents

✨ Features

  • Article Management

    • View all articles
    • Create new articles
    • Read full article details
    • Update existing articles
    • Delete articles
  • User Interface

    • Responsive design
    • Clean and modern layout
    • Easy navigation
    • Form validation

🛠 Tech Stack

  • Backend

    • Node.js
    • Express.js
    • MongoDB with Mongoose
    • EJS Template Engine
  • Frontend

    • CSS3
    • Bootstrap
    • EJS Templates

📁 Project Structure

articles-nodejs/
├── models/
│   └── Article.js         # Article schema and model
├── public/
│   └── css/              # Static CSS files
├── views/
│   ├── layouts/          # Layout templates
│   ├── article.ejs       # Single article view
│   ├── edit-article.ejs  # Edit article form
│   ├── home.ejs         # Homepage view
│   └── new-article.ejs  # New article form
├── index.js             # Main application file
└── package.json        # Project dependencies

🚀 Installation

  1. Clone the repository
git clone https://github.com/MoAjabali/articles-nodejs
cd articles-nodejs
  1. Install dependencies
npm install
  1. Set up MongoDB
  • Ensure MongoDB is installed and running
  • Default connection string: mongodb://127.0.0.1:27017/nodejsdb
  1. Start the application
npm run dev

The application will be available at https://articles-nodejs-8akj.onrender.com

📡 API Endpoints

Page Routes

  • GET / - Home page (displays all articles)
  • GET /articles/new - New article form
  • GET /articles/:id - View specific article
  • GET /articles/:id/edit - Edit article form

Action Routes

  • POST /articles/new - Create new article
  • POST /articles/:id - Update article
  • POST /articles/del/:id - Delete article

💾 Database Schema

Article Model

{
  title: String,   // Article title
  body: String,    // Article content
  author: String   // Article author
}

🔄 Features in Development

  • User authentication
  • Article categories
  • Comments system
  • Rich text editor
  • Image upload support

📝 License

This project is licensed under the ISC License.


Made with ❤️ using Node.js and Express

About

A full-stack web application for managing articles with CRUD operations. using nodejs and express.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published