Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/ayo-awe/blogging_api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ayo-awe/blogging_api

  • v0.0.0-20240717145045-3a1c09eac6a6
  • Source
  • Go
  • Socket score

Version published
Created
Source

Backend Blogging REST API

This is a backend REST API built with Golang, using the Chi router and Postgres as the database. It is part of a collection of backend projects provided at roadmap.sh

Table of Contents

Introduction

This project is a RESTful API that provides various endpoints for managing articles on blog. It leverages the Chi router for handling HTTP requests and Postgres for persistent data storage.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Golang installed on your machine
  • Postgres database set up and running
  • Make tool installed for running commands

Installation

  1. Clone the repository:
    git clone https://github.com/ayo-awe/blogging_api.git
    
  2. Navigate to the project directory:
    cd blogging_api
    
  3. Install the project dependencies:
    go mod download
    

Running the Server

To run the server in development mode, use the following command:

make dev

Configuration

Configuration options for the API, such as database connection strings and server ports, are specified in a .env file. Create a .env file in the project root and add the necessary configuration variables.

Example .env file:

DB_URL=postgresql://<username>:<password>@<host>:<port>/<database>
PORT=8080

Swagger Documentation

The API documentation is available via Swagger. Once the server is running, you can access the Swagger UI at:

http://localhost:8080/swagger/index.html

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

FAQs

Package last updated on 17 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc