Coder Social home page Coder Social logo

open-music-api's Introduction

Open Music API

This readme provides an overview and instructions for setting up the Open Music API project using Hapi.js, Redis, PostgreSQL, and RabbitMQ.

Table of Contents

Introduction

The Open Music API project is a RESTful API that allows users to manage and access music data. It is built using Hapi.js as the server framework, Redis for caching, PostgreSQL as the database, and RabbitMQ for message queuing.

Prerequisites

Before setting up the project, make sure you have the following prerequisites installed:

  • Node.js and npm
  • Redis
  • PostgreSQL
  • RabbitMQ

Installation

  1. Clone the repository: git clone https://github.com/ikhsan3adi/open-music-api.git
  2. Navigate to the project directory: cd open-music-api
  3. Install the dependencies: npm install

Configuration

  1. Create a .env file in the project root directory.
  2. Configure the following environment variables in the .env file:
    • HOST : The hostname of the server.
    • PORT : The port on which the server will run.
    • PGHOST : The hostname of the PostgreSQL database.
    • PGPORT : The port number of the PostgreSQL database.
    • PGDATABASE : The name of the PostgreSQL database.
    • PGUSER : The username for accessing the PostgreSQL database.
    • PGPASSWORD : The password for accessing the PostgreSQL database.
    • REDIS_SERVER : The hostname of the Redis server.
    • RABBITMQ_SERVER : The hostname of the RabbitMQ server.

Usage

To start the server, run the following command: npm start

Endpoints

The Open Music API provides the following endpoints:

  • GET /songs : Get a list of all songs.
  • GET /songs/{songId} : Get details of a specific song.
  • POST /songs : Add a new song.
  • PUT /songs/{songId} : Update details of a specific song.
  • DELETE /songs/{songId} : Delete a specific song.

Other endpoints coming soon!

open-music-api's People

Contributors

ikhsan3adi avatar

Stargazers

Beni Firdaus avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.