Skip to content

🎬 asoul.video 网站前后端源码 / The source code of https://asoul.video

License

Notifications You must be signed in to change notification settings

coding-ax/asoul-video

 
 

Repository files navigation

🎬 asoul-video Go Go Report Card Sourcegraph

The source code of https://asoul.video/

Set up development environment

Frontend

TBD

Backend

The ASOUL-Video backend server binary is meant to be run on Linux system, but you can also develop it on macOS.

Step 1: Install dependencies

ASOUL-Video backend has the following dependencies:

macOS
  1. Install Homebrew.

  2. Install dependencies:

    brew install go postgresql git
  3. Configure PostgreSQL to start automatically:

    brew services start postgresql
  4. Ensure psql, the PostgreSQL command line client, is on your $PATH. Homebrew does not put it there by default. Homebrew gives you the command to run to insert psql in your path in the "Caveats" section of brew info postgresql. Alternatively, you can use the command below. It might need to be adjusted depending on your Homebrew prefix (/usr/local below) and shell (bash below).

    hash psql || { echo 'export PATH="/usr/local/opt/postgresql/bin:$PATH"' >> ~/.bash_profile }
    source ~/.bash_profile

Step 2: Initialize your database

You need a fresh Postgres database and a database user that has full ownership of that database.

  1. Create a database for the current Unix user:

    # For Linux users, first access the postgres user shell
    sudo su - postgres
    createdb
  2. Create the ASOUL-Video user and password:

    createuser --superuser asoulvideo
    psql -c "ALTER USER asoulvideo WITH PASSWORD 'asoulvideo';"
  3. Create the ASOUL-Video database:

    createdb --owner=asoulvideo --encoding=UTF8 --template=template0 asoulvideo

Step 3: Get the code

Generally, you don't need a full clone, so set --depth to 1:

git clone --depth 1 https://github.com/asoul-video/asoul-video

NOTE The repository has Go Modules enabled, please clone to somewhere outside your $GOPATH.

Step 4: Configure database settings

The Fork AI backend reads PostgreSQL connection configuration from the PG* environment variables.

Add these, for example, in your ~/.bashrc:

export PGPORT=5432
export PGHOST=localhost
export PGUSER=asoulvideo
export PGPASSWORD=asoulvideo
export PGDATABASE=asoulvideo
export PGSSLMODE=disable

You can also use a tool like direnv to source these env vars on demand when you start the backend.

Step 5: Start the web server

The web server requires few environment variables to make it fully working, add them to your ~/.bashrc:

export SOURCE_REPORT_KEY=<REDACTED>
go build . && ./asoul-video

License

MIT

About

🎬 asoul.video 网站前后端源码 / The source code of https://asoul.video

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 51.2%
  • PLpgSQL 21.3%
  • Vue 17.8%
  • HTML 7.1%
  • JavaScript 1.4%
  • Shell 1.2%