Skip to content

rayan25nov/Blog-task-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend Project

Node.js Express.js TypeScript MongoDB

Table of Contents

Introduction

This is a backend project built with Node.js, Express.js, TypeScript, and MongoDB. It includes user authentication, blog management, and image upload functionalities.

Features

  • User authentication (signup, signin, logout)
  • Blog management (create, read, update, delete)
  • Image upload using Cloudinary
  • API documentation with Swagger

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/backend.git
  2. Navigate to the project directory:
    cd backend
  3. Install dependencies:
    npm install

Usage

  1. Build the project:
    npm run build
  2. Start the server:
    npm start
  3. For development mode:
    npm run dev

API Documentation

The API documentation is available at /api-docs when the server is running.

Environment Variables

Create a .env file in the root directory and add the following environment variables:

PORT=5000
DB_CNN=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLOUD_NAME=your_cloudinary_cloud_name
API_KEY=your_cloudinary_api_key
API_SECRET=your_cloudinary_api_secret
SERVER_URL=your_server_url

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published