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).
- Clone the repository:
git clone https://github.com/samsepiol-fs/blog-api.git cd blog-api
- Install dependencies:
npm install
- 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
To run the API in development mode:
npm run dev
The API will be available at http://localhost:3000.
npm run dev
: Run the API in development mode with nodemon.npm start
: Start the API in production mode.
- 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.
Feel free to contribute by reporting issues, suggesting features, or submitting pull requests.
This project is licensed under the ISC License.