Coder Social home page Coder Social logo

hls_service_test's Introduction

HLS service test demo

Description

landing

This is a demo to test a HLS service. It uses a golang server to serve the HLS files and a next.js app to handle the user interactions. The golang API handles all HTTP requests and allows users to log in using JWT auth and serves the HLS files. The next.js app to handle the user interactions, such as:

  • create account
  • login
  • logout
  • list of available videos
  • video player

Requirements

  • docker to run the containers

  • Or if you want to run locally

    • docker (for the postgres database)
    • golang
    • node.js
    • yarn

How to run

  • Change the connection string in ./backend/db/db.go file to the correct database connection string depending on your setup
// psqlInfo := os.Getenv("DATABASE_URL")
psqlInfo := fmt.Sprintf("port=%d user=%s password=%s dbname=%s sslmode=disable", port, dbuser, dbpass, dbname)

How to run with docker

  • docker compose build
  • docker compose up

How to run locally without docker

  • Run the database with docker compose up postgres (needs docker installed)
  • On one terminal, run cd ./backend and run go run . for the golang server
  • On another terminal, run cd ./frontend and run yarn dev for the next.js app

hls_service_test's People

Contributors

xmuramasa 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.