Skip to content

samsepiol-fs/blog-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog API

Description

This is a simple API for managing blog-related functionalities. It utilizes technologies like Express, MongoDB via Mongoose, and includes user authentication using JWT (JSON Web Tokens).

Installation

  1. Clone the repository:
    git clone https://github.com/samsepiol-fs/blog-api.git
    cd blog-api
  2. Install dependencies:
    npm install
  3. Set up environment variables:
    • Create a .env file in the root directory.
    • Add the following variables:
    MONGO_URI=your_mongo_db_uri
    JWT_SECRET=your_jwt_secret
    

Usage

To run the API in development mode:

npm run dev

The API will be available at http://localhost:3000.

Scripts

  • npm run dev: Run the API in development mode with nodemon.
  • npm start: Start the API in production mode.

Dependencies

  • bcryptjs: Password hashing library.
  • cookie-parser: Parse HTTP request cookies.
  • dotenv: Load environment variables from a .env file.
  • express: Web application framework for Node.js.
  • jsonwebtoken: Generate and verify JSON Web Tokens.
  • mongoose: MongoDB object modeling tool.
  • nodemon: Monitor for changes and automatically restart the server.

Contributing

Feel free to contribute by reporting issues, suggesting features, or submitting pull requests.

License

This project is licensed under the ISC License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published