Skip to content

Kingrexicon/Kr-medium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KR Medium A simple Node.js CRUD (Create, Read, Update, Delete) application using Express, MongoDB, EJS, and Multer for file uploads. Users can create, view, update, and delete stories with optional image uploads. access site on this link https://kr-medium.onrender.com/ Screenshot (85) Screenshot (84)

Features

  • Create stories with title, author, date, time, and content.
  • Upload images for each story.
  • View all stories on the homepage.
  • Update and delete stories.
  • Responsive UI styled with CSS.
  • Uses MongoDB for data storage.

Project Structure

.
├── .env
├── .gitignore
├── index.html
├── package.json
├── server.js
├── public/
│   ├── create_product.html
│   ├── main.js
│   ├── css/
│   │   └── style.css
│   └── uploads/
│       └── [uploaded images]
├── views/
│   └── index.ejs
└── .vscode/
    └── settings.json

Setup

  1. Clone the repository

    git clone <repo-url>
    cd crud
  2. Install dependencies

    npm install
  3. Configure environment variables
    Create a .env file in the root directory with the following:

    PORT=4000
    DB_string=your_mongodb_connection_string
    
  4. Start the server

    npm start

    Or for development with auto-reload:

    npm run dev
  5. Access the app
    Open http://localhost:4000 in your browser.

Usage

  • Homepage: Lists all stories.
  • Write Story: Click "Write" in the header to add a new story.
  • Image Upload: Images are saved in public/uploads.
  • Update/Delete: Use the update and delete buttons (see public/main.js).

Technologies Used

File Overview

License

ISC


Note:

  • Ensure MongoDB is running and accessible via your connection string.
  • Uploaded images are stored in public/uploads.
  • For any issues, check the

About

medium. but it's mine, could be yours too

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors