Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 1.42 KB

File metadata and controls

68 lines (47 loc) · 1.42 KB

Blogging Platform API

The project assignment for roadmap.sh

URL of the assignment in roadmap.sh:
https://roadmap.sh/projects/blogging-platform-api

This API makes CRUD operations on a postgres database to handle different blog posts.
Each post has a title, content, category, tags, created_at and updated_at properties.
There are no authentication or authorization.

Installation

  1. Clone the repository:

    git clone https://github.com/ilia-abbasi/Blogging-Platform-API.git
    cd Blogging-Platform-API
  2. Install dependencies:

    npm install
  3. Create the .env file in the root of the project and set the variables:

    PORT=your_port
    DB_USER=database_username
    DB_HOST=database_host
    DB_NAME=database_name
    DB_PASSWORD=database_password
    DB_PORT=database_port
  4. Create the posts table in your database:

    npm run setup

Usage

  1. Run the server with:

    npm run start
  2. Send requests using Postman.

Dependencies

  • dotenv
  • express
  • express-validator
  • lodash
  • morgan
  • pg

The source code is formatted with Prettier.


Read the docs here.
Blogging-Platform-API is licensed under the GPL-3.0 license.