Skip to content

Latest commit

Β 

History

History
84 lines (67 loc) Β· 2.66 KB

File metadata and controls

84 lines (67 loc) Β· 2.66 KB

☁️ Cloudkeep Server

The backend REST API for the Cloudkeep application, handling data persistence, authentication, and file storage. Built with Node.js, Express, and MongoDB, and integrates with Cloudinary for media assets.

πŸš€ Features

  • RESTful API: Structured endpoints for Thoughts and Notes management.
  • Cloud Database: Data storage using MongoDB (via Mongoose).
  • File Storage: Integration with Cloudinary for image and file uploads.
  • Middleware: Custom middleware for error handling and request processing.
  • CORS Support: Configured for secure cross-origin requests.

πŸ› οΈ Tech Stack

πŸ“¦ Installation & Setup

  1. Clone the repository:

    git clone https://github.com/dineshingale/Cloudkeep-server.git
    cd Cloudkeep-server
  2. Install dependencies:

    npm install
  3. Environment Setup: Create a .env file in the root directory and configure the following variables:

    PORT=5000
    MONGODB_URI=your_mongodb_connection_string
    CLOUDINARY_CLOUD_NAME=your_cloud_name
    CLOUDINARY_API_KEY=your_api_key
    CLOUDINARY_API_SECRET=your_api_secret
  4. Run Development Server:

    npm run dev

    The server will start on http://localhost:5000.

  5. Run in Production:

    npm start

πŸ“‚ Project Structure

src/
β”œβ”€β”€ config/          # Configuration files (DB, Cloudinary)
β”œβ”€β”€ controllers/     # Route logic
β”œβ”€β”€ models/          # Mongoose schemas
β”œβ”€β”€ routes/          # API route definitions
β”œβ”€β”€ middleware/      # Express middleware
β”œβ”€β”€ utils/           # Helper functions
└── server.js        # Entry point

πŸ“‘ API Endpoints

Method Endpoint Description
GET /api/thoughts Retrieve all thoughts
POST /api/thoughts Create a new thought
PATCH /api/thoughts/:id Update a thought
DELETE /api/thoughts/:id Delete a thought
(Note: Refer to routes/ for the complete API map)

🀝 Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/new-api).
  3. Commit your changes (git commit -m 'feat: add new endpoint').
  4. Push to the branch (git push origin feature/new-api).
  5. Open a Pull Request.