add badges
Signed-off-by: gwg313 <gwg313@pm.me>
This commit is contained in:
parent
0650cb19e9
commit
946b17b68c
17 changed files with 100 additions and 735 deletions
98
.github/ISSUE_TEMPLATE/bug.yaml
vendored
98
.github/ISSUE_TEMPLATE/bug.yaml
vendored
|
|
@ -1,98 +0,0 @@
|
||||||
name: 🐞 Bug Report
|
|
||||||
description: File a bug/issue and help us improve Audiobookshelf
|
|
||||||
title: '[Bug]: '
|
|
||||||
labels: ['bug', 'triage']
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: 'Thank you for filing a bug report! 🐛'
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: 'Please first search for your issue and check the [docs](https://audiobookshelf.org/docs).'
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: 'Report issues with the mobile app [here](https://github.com/advplyr/audiobookshelf-app/issues/new/choose).'
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: 'Join the [discord server](https://discord.gg/HQgCbd6E75) for questions or if you are not sure about a bug.'
|
|
||||||
- type: textarea
|
|
||||||
id: what-happened
|
|
||||||
attributes:
|
|
||||||
label: What happened?
|
|
||||||
placeholder: Tell us what you see!
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: what-was-expected
|
|
||||||
attributes:
|
|
||||||
label: What did you expect to happen?
|
|
||||||
placeholder: Tell us what you expected to see! Be as descriptive as you can and include screenshots if applicable.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: steps-to-reproduce
|
|
||||||
attributes:
|
|
||||||
label: Steps to reproduce the issue
|
|
||||||
value: '1. '
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: '## Install Environment'
|
|
||||||
- type: input
|
|
||||||
id: version
|
|
||||||
attributes:
|
|
||||||
label: Audiobookshelf version
|
|
||||||
description: Do not put 'Latest version', please put the actual version here
|
|
||||||
placeholder: 'e.g. v1.6.60'
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
id: install
|
|
||||||
attributes:
|
|
||||||
label: How are you running audiobookshelf?
|
|
||||||
options:
|
|
||||||
- Docker
|
|
||||||
- Debian/PPA
|
|
||||||
- Windows Tray App
|
|
||||||
- Built from source
|
|
||||||
- Other (list in "Additional Notes" box)
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
id: server-os
|
|
||||||
attributes:
|
|
||||||
label: What OS is your Audiobookshelf server hosted from?
|
|
||||||
options:
|
|
||||||
- Windows
|
|
||||||
- macOS
|
|
||||||
- Linux
|
|
||||||
- Other (list in "Additional Notes" box)
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
id: desktop-browsers
|
|
||||||
attributes:
|
|
||||||
label: If the issue is being seen in the UI, what browsers are you seeing the problem on?
|
|
||||||
options:
|
|
||||||
- Chrome
|
|
||||||
- Firefox
|
|
||||||
- Safari
|
|
||||||
- Edge
|
|
||||||
- Firefox for Android
|
|
||||||
- Chrome for Android
|
|
||||||
- Safari on iOS
|
|
||||||
- Other (list in "Additional Notes" box)
|
|
||||||
- type: textarea
|
|
||||||
id: logs
|
|
||||||
attributes:
|
|
||||||
label: Logs
|
|
||||||
description: Please include any relevant logs here. This field is automatically formatted into code, so you do not need to include any backticks.
|
|
||||||
placeholder: Paste logs here
|
|
||||||
render: shell
|
|
||||||
- type: textarea
|
|
||||||
id: additional-notes
|
|
||||||
attributes:
|
|
||||||
label: Additional Notes
|
|
||||||
description: Anything else you want to add?
|
|
||||||
placeholder: 'e.g. I have tried X, Y, and Z.'
|
|
||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
5
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1,5 +0,0 @@
|
||||||
blank_issues_enabled: false
|
|
||||||
contact_links:
|
|
||||||
- name: Discord
|
|
||||||
url: https://discord.gg/HQgCbd6E75
|
|
||||||
about: Ask questions, get help troubleshooting, and join the Abs community here.
|
|
||||||
63
.github/ISSUE_TEMPLATE/feature.yml
vendored
63
.github/ISSUE_TEMPLATE/feature.yml
vendored
|
|
@ -1,63 +0,0 @@
|
||||||
name: 🚀 Feature Request
|
|
||||||
description: Request a feature/enhancement
|
|
||||||
title: '[Enhancement]: '
|
|
||||||
labels: ['enhancement']
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: '#### *Mobile app features should be [requested here](https://github.com/advplyr/audiobookshelf-app/issues/new/choose)*.'
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: '## Web/Server Feature Request Description'
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: 'Please first search in both issues & discussions for your enhancement.'
|
|
||||||
- type: dropdown
|
|
||||||
id: enhancment-type
|
|
||||||
attributes:
|
|
||||||
label: Type of Enhancement
|
|
||||||
options:
|
|
||||||
- Server Backend
|
|
||||||
- Web Interface/Frontend
|
|
||||||
- Documentation
|
|
||||||
- type: textarea
|
|
||||||
id: describe
|
|
||||||
attributes:
|
|
||||||
label: Describe the Feature/Enhancement
|
|
||||||
description: Please help us understand what you want.
|
|
||||||
placeholder: What is your vision?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: the-why
|
|
||||||
attributes:
|
|
||||||
label: Why would this be helpful?
|
|
||||||
description: Please help us understand why this would enhance your experience.
|
|
||||||
placeholder: Explain the "why" or "use case".
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: image
|
|
||||||
attributes:
|
|
||||||
label: Future Implementation (Screenshot)
|
|
||||||
description: Please help us visualize by including a doodle or screenshot.
|
|
||||||
placeholder: How could this look?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: '## Web/Server Current Implementation'
|
|
||||||
- type: input
|
|
||||||
id: version
|
|
||||||
attributes:
|
|
||||||
label: Audiobookshelf Server Version
|
|
||||||
description: Do not put 'Latest version', please put your current version number here
|
|
||||||
placeholder: 'e.g. v1.6.60'
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: current-image
|
|
||||||
attributes:
|
|
||||||
label: Current Implementation (Screenshot)
|
|
||||||
description: What page were you looking at when you thought of this enhancement?
|
|
||||||
placeholder: If an image is not applicable, please explain why.
|
|
||||||
33
.github/pull_request_template.md
vendored
33
.github/pull_request_template.md
vendored
|
|
@ -1,33 +0,0 @@
|
||||||
<!--
|
|
||||||
For Work In Progress Pull Requests, please use the Draft PR feature,
|
|
||||||
see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details.
|
|
||||||
|
|
||||||
If you do not follow this template, the PR may be closed without review.
|
|
||||||
|
|
||||||
Please ensure all checks pass.
|
|
||||||
If you are a new contributor, the workflows will need to be manually approved before they run.
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Brief summary
|
|
||||||
|
|
||||||
<!-- Please provide a brief summary of what your PR attempts to achieve. -->
|
|
||||||
|
|
||||||
## Which issue is fixed?
|
|
||||||
|
|
||||||
<!-- Which issue number does this PR fix? Ex: "Fixes #1234" -->
|
|
||||||
|
|
||||||
## In-depth Description
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Describe your solution in more depth.
|
|
||||||
How does it work? Why is this the best solution?
|
|
||||||
Does it solve a problem that affects multiple users or is this an edge case for your setup?
|
|
||||||
-->
|
|
||||||
|
|
||||||
## How have you tested this?
|
|
||||||
|
|
||||||
<!-- Please describe in detail with reproducible steps how you tested your changes. -->
|
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
|
|
||||||
<!-- If your PR includes any changes to the web client, please include screenshots or a short video from before and after your changes. -->
|
|
||||||
55
.github/workflows/apply_comments.yaml
vendored
55
.github/workflows/apply_comments.yaml
vendored
|
|
@ -1,55 +0,0 @@
|
||||||
name: Add issue comments by label
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types:
|
|
||||||
- labeled
|
|
||||||
jobs:
|
|
||||||
help-wanted:
|
|
||||||
if: github.event.label.name == 'help wanted'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
steps:
|
|
||||||
- name: Help wanted comment
|
|
||||||
run: gh issue comment "$NUMBER" --body "$BODY"
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GH_REPO: ${{ github.repository }}
|
|
||||||
NUMBER: ${{ github.event.issue.number }}
|
|
||||||
BODY: >
|
|
||||||
This issue is not able to be completed due to limited bandwidth or access to the required test hardware.
|
|
||||||
|
|
||||||
This issue is available for anyone to work on.
|
|
||||||
|
|
||||||
|
|
||||||
config-issue:
|
|
||||||
if: github.event.label.name == 'config-issue'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
steps:
|
|
||||||
- name: Config issue comment
|
|
||||||
run: gh issue close "$NUMBER" --reason "not planned" --comment "$BODY"
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GH_REPO: ${{ github.repository }}
|
|
||||||
NUMBER: ${{ github.event.issue.number }}
|
|
||||||
BODY: >
|
|
||||||
After reviewing this issue, this appears to be a problem with your setup and not Audiobookshelf. This issue is being closed to keep the issue tracker focused on Audiobookshelf itself. Please reach out on the Audiobookshelf Discord for community support.
|
|
||||||
|
|
||||||
Some common search terms to help you find the solution to your problem:
|
|
||||||
- Reverse proxy
|
|
||||||
- Enabling websockets
|
|
||||||
- SSL (https vs http)
|
|
||||||
- Configuring a static IP
|
|
||||||
- `localhost` versus IP address
|
|
||||||
- hairpin NAT
|
|
||||||
- VPN
|
|
||||||
- firewall ports
|
|
||||||
- public versus private network
|
|
||||||
- bridge versus host mode
|
|
||||||
- Docker networking
|
|
||||||
- DNS (such as EAI_AGAIN errors)
|
|
||||||
|
|
||||||
After you have followed these steps, please post the solution or steps you followed to fix the problem to help others in the future, or show that it is a problem with Audiobookshelf so we can reopen the issue.
|
|
||||||
|
|
||||||
20
.github/workflows/close-issues-on-release.yml
vendored
20
.github/workflows/close-issues-on-release.yml
vendored
|
|
@ -1,20 +0,0 @@
|
||||||
name: Close fixed issues on release.
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
issues: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
comment:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Close issues marked as fixed upon a release.
|
|
||||||
uses: gcampbell-msft/fixed-pending-release@7fa1b75a0c04bcd4b375110522878e5f6100cff5
|
|
||||||
with:
|
|
||||||
label: 'awaiting release'
|
|
||||||
removeLabel: true
|
|
||||||
applyToAll: true
|
|
||||||
message: Fixed in [${releaseTag}](${releaseUrl}).
|
|
||||||
42
.github/workflows/close_blank_issues.yaml
vendored
42
.github/workflows/close_blank_issues.yaml
vendored
|
|
@ -1,42 +0,0 @@
|
||||||
name: Close Issues not using a template
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
close_issue:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check issue headings
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const issueBody = context.payload.issue.body || "";
|
|
||||||
|
|
||||||
// Match Markdown headings (e.g., # Heading, ## Heading)
|
|
||||||
const headingRegex = /^(#{1,6})\s.+/gm;
|
|
||||||
const headings = [...issueBody.matchAll(headingRegex)];
|
|
||||||
|
|
||||||
if (headings.length < 3) {
|
|
||||||
// Post a comment
|
|
||||||
await github.rest.issues.createComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.payload.issue.number,
|
|
||||||
body: "Thank you for opening an issue! To help us review your request efficiently, please use one of the provided issue templates. If you're seeking information or have a general question, consider opening a Discussion or joining the conversation on our Discord. Thanks!"
|
|
||||||
});
|
|
||||||
|
|
||||||
// Close the issue
|
|
||||||
await github.rest.issues.update({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.payload.issue.number,
|
|
||||||
state: "closed"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
78
.github/workflows/codeql.yml
vendored
78
.github/workflows/codeql.yml
vendored
|
|
@ -1,78 +0,0 @@
|
||||||
name: 'CodeQL'
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ['master']
|
|
||||||
# Only build when files in these directories have been changed
|
|
||||||
paths:
|
|
||||||
- client/**
|
|
||||||
- server/**
|
|
||||||
- test/**
|
|
||||||
- index.js
|
|
||||||
- package.json
|
|
||||||
pull_request:
|
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches: ['master']
|
|
||||||
# Only build when files in these directories have been changed
|
|
||||||
paths:
|
|
||||||
- client/**
|
|
||||||
- server/**
|
|
||||||
- test/**
|
|
||||||
- index.js
|
|
||||||
- package.json
|
|
||||||
schedule:
|
|
||||||
- cron: '16 5 * * 4'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analyze:
|
|
||||||
name: Analyze
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
language: ['javascript']
|
|
||||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
||||||
# Use only 'java' to analyze code written in Java, Kotlin or both
|
|
||||||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
|
||||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v2
|
|
||||||
with:
|
|
||||||
languages: ${{ matrix.language }}
|
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
||||||
# By default, queries listed here will override any specified in a config file.
|
|
||||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
||||||
|
|
||||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
||||||
# queries: security-extended,security-and-quality
|
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v2
|
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
||||||
|
|
||||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
|
||||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
|
||||||
|
|
||||||
# - run: |
|
|
||||||
# echo "Run, Build Application using script"
|
|
||||||
# ./location_of_script_within_repo/buildscript.sh
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v2
|
|
||||||
with:
|
|
||||||
category: '/language:${{matrix.language}}'
|
|
||||||
48
.github/workflows/component-tests.yml
vendored
48
.github/workflows/component-tests.yml
vendored
|
|
@ -1,48 +0,0 @@
|
||||||
name: Run Component Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
ref:
|
|
||||||
description: 'Branch/Tag/SHA to test'
|
|
||||||
required: true
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'client/**'
|
|
||||||
- '.github/workflows/component-tests.yml'
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'client/**'
|
|
||||||
- '.github/workflows/component-tests.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run-component-tests:
|
|
||||||
name: Run Component Tests
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout (push/pull request)
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
if: github.event_name != 'workflow_dispatch'
|
|
||||||
|
|
||||||
- name: Checkout (workflow_dispatch)
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ inputs.ref }}
|
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
cd client
|
|
||||||
npm ci
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: |
|
|
||||||
cd client
|
|
||||||
npm test
|
|
||||||
82
.github/workflows/docker-build.yml
vendored
82
.github/workflows/docker-build.yml
vendored
|
|
@ -1,82 +0,0 @@
|
||||||
---
|
|
||||||
name: Build and Push Docker Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
# Allows you to run workflow manually from Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tags:
|
|
||||||
description: 'Docker Tag'
|
|
||||||
required: true
|
|
||||||
default: 'latest'
|
|
||||||
push:
|
|
||||||
branches: [main, master]
|
|
||||||
tags:
|
|
||||||
- 'v*.*.*'
|
|
||||||
# Only build when files in these directories have been changed
|
|
||||||
paths:
|
|
||||||
- client/**
|
|
||||||
- server/**
|
|
||||||
- index.js
|
|
||||||
- package.json
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ !contains(github.event.head_commit.message, 'skip ci') && github.repository == 'advplyr/audiobookshelf' }}
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: advplyr/audiobookshelf,ghcr.io/${{ github.repository_owner }}/audiobookshelf
|
|
||||||
tags: |
|
|
||||||
type=edge,branch=master
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
|
|
||||||
- name: Setup QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Cache Docker layers
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: /tmp/.buildx-cache
|
|
||||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-buildx-
|
|
||||||
|
|
||||||
- name: Login to Dockerhub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Login to ghcr
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GHCR_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
tags: ${{ github.event.inputs.tags || steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
context: .
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
push: true
|
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
|
||||||
|
|
||||||
- name: Move cache
|
|
||||||
run: |
|
|
||||||
rm -rf /tmp/.buildx-cache
|
|
||||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
|
||||||
31
.github/workflows/i18n-integration.yml
vendored
31
.github/workflows/i18n-integration.yml
vendored
|
|
@ -1,31 +0,0 @@
|
||||||
name: Verify all i18n files are alphabetized
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- client/strings/** # Should only check if any strings changed
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- client/strings/** # Should only check if any strings changed
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update_translations:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
# Check out the repository
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# Set up node to run the javascript
|
|
||||||
- name: Set up node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
# The only argument is the `directory`, which is where the i18n files are
|
|
||||||
# stored.
|
|
||||||
- name: Run Update JSON Files action
|
|
||||||
uses: audiobookshelf/audiobookshelf-i18n-updater@v1.3.0
|
|
||||||
with:
|
|
||||||
directory: 'client/strings/' # Adjust the directory path as needed
|
|
||||||
52
.github/workflows/integration-test.yml
vendored
52
.github/workflows/integration-test.yml
vendored
|
|
@ -1,52 +0,0 @@
|
||||||
name: Integration Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- 'dependabot/**' # Don't run dependabot branches, as they are already covered by pull requests
|
|
||||||
# Only build when files in these directories have been changed
|
|
||||||
paths:
|
|
||||||
- client/**
|
|
||||||
- server/**
|
|
||||||
- test/**
|
|
||||||
- index.js
|
|
||||||
- package.json
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: build and test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: setup node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: install pkg (using yao-pkg fork for targeting node20)
|
|
||||||
run: npm install -g @yao-pkg/pkg
|
|
||||||
|
|
||||||
- name: get client dependencies
|
|
||||||
working-directory: client
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: build client
|
|
||||||
working-directory: client
|
|
||||||
run: npm run generate
|
|
||||||
|
|
||||||
- name: get server dependencies
|
|
||||||
run: npm ci --only=production
|
|
||||||
|
|
||||||
- name: build binary
|
|
||||||
run: pkg -t node20-linux-x64 -o audiobookshelf .
|
|
||||||
|
|
||||||
- name: run audiobookshelf
|
|
||||||
run: |
|
|
||||||
./audiobookshelf &
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
- name: test if server is available
|
|
||||||
run: curl -sf http://127.0.0.1:3333 | grep Audiobookshelf
|
|
||||||
39
.github/workflows/lint-openapi.yml
vendored
39
.github/workflows/lint-openapi.yml
vendored
|
|
@ -1,39 +0,0 @@
|
||||||
name: API linting
|
|
||||||
|
|
||||||
# Run on pull requests or pushes when there is a change to any OpenAPI files in docs/
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'docs/**'
|
|
||||||
|
|
||||||
# This action only needs read permissions
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
# Check out the repository
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# Set up node to run the javascript
|
|
||||||
- name: Set up node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
# Install Redocly CLI
|
|
||||||
- name: Install Redocly CLI
|
|
||||||
run: npm install -g @redocly/cli@latest
|
|
||||||
|
|
||||||
# Perform linting for exploded spec
|
|
||||||
- name: Run linting for exploded spec
|
|
||||||
run: redocly lint docs/root.yaml --format=github-actions
|
|
||||||
|
|
||||||
# Perform linting for bundled spec
|
|
||||||
- name: Run linting for bundled spec
|
|
||||||
run: redocly lint docs/openapi.json --format=github-actions
|
|
||||||
17
.github/workflows/notify-abs-windows.yml
vendored
17
.github/workflows/notify-abs-windows.yml
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
name: Dispatch an abs-windows event
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
abs-windows-dispatch:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Send a remote repository dispatch event
|
|
||||||
uses: peter-evans/repository-dispatch@v3
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.ABS_WINDOWS_PAT }}
|
|
||||||
repository: mikiher/audiobookshelf-windows
|
|
||||||
event-type: build-windows
|
|
||||||
38
.github/workflows/unit-tests.yml
vendored
38
.github/workflows/unit-tests.yml
vendored
|
|
@ -1,38 +0,0 @@
|
||||||
name: Run Unit Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
ref:
|
|
||||||
description: 'Branch/Tag/SHA to test'
|
|
||||||
required: true
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run-unit-tests:
|
|
||||||
name: Run Unit Tests
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout (push/pull request)
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
if: github.event_name != 'workflow_dispatch'
|
|
||||||
|
|
||||||
- name: Checkout (workflow_dispatch)
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ inputs.ref }}
|
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: npm test
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
---
|
||||||
|
name: build-and-push
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: quay.io/buildah/stable
|
image: quay.io/buildah/stable
|
||||||
|
|
@ -9,5 +14,5 @@ steps:
|
||||||
from_secret: HARBOR_PASSWORD
|
from_secret: HARBOR_PASSWORD
|
||||||
commands:
|
commands:
|
||||||
- buildah login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" registry.gwg313.xyz
|
- buildah login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" registry.gwg313.xyz
|
||||||
- buildah bud -t registry.gwg313.xyz/library/audiobookshelf:latest .
|
- buildah bud -t registry.gwg313.xyz/library/audiobookshelf-rootless:latest .
|
||||||
- buildah push registry.gwg313.xyz/library/audiobookshelf:latest
|
- buildah push registry.gwg313.xyz/library/audiobookshelf-rootless:latest
|
||||||
|
|
|
||||||
113
readme.md
113
readme.md
|
|
@ -16,9 +16,15 @@
|
||||||
|
|
||||||
Audiobookshelf is a self-hosted audiobook and podcast server.
|
Audiobookshelf is a self-hosted audiobook and podcast server.
|
||||||
|
|
||||||
|
### Build Status & Image
|
||||||
|
|
||||||
|
[](https://ci.gwg313.xyz/gwg313/audiobookshelf-rootless)
|
||||||
|
[](https://registry.gwg313.xyz/harbor/projects/1/repositories/audiobookshelf/artifacts-tab?publicAndNotLogged=yes)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Fully **open-source**, including the [android & iOS app](https://github.com/advplyr/audiobookshelf-app) _(in beta)_
|
- Fully **open-source**, including the
|
||||||
|
[android & iOS app](https://github.com/advplyr/audiobookshelf-app) _(in beta)_
|
||||||
- Stream all audio formats on the fly
|
- Stream all audio formats on the fly
|
||||||
- Search and add podcasts to download episodes w/ auto-download
|
- Search and add podcasts to download episodes w/ auto-download
|
||||||
- Multi-user support w/ custom permissions
|
- Multi-user support w/ custom permissions
|
||||||
|
|
@ -37,25 +43,30 @@ Audiobookshelf is a self-hosted audiobook and podcast server.
|
||||||
- Send ebook to device (i.e. Kindle)
|
- Send ebook to device (i.e. Kindle)
|
||||||
- Open RSS feeds for podcasts and audiobooks
|
- Open RSS feeds for podcasts and audiobooks
|
||||||
|
|
||||||
Is there a feature you are looking for? [Suggest it](https://github.com/advplyr/audiobookshelf/issues/new/choose)
|
Is there a feature you are looking for?
|
||||||
|
[Suggest it](https://github.com/advplyr/audiobookshelf/issues/new/choose)
|
||||||
|
|
||||||
Join us on [Discord](https://discord.gg/HQgCbd6E75)
|
Join us on [Discord](https://discord.gg/HQgCbd6E75)
|
||||||
|
|
||||||
### Demo
|
### Demo
|
||||||
|
|
||||||
Check out the web client demo: https://audiobooks.dev/ (thanks for hosting [@Vito0912](https://github.com/Vito0912)!)
|
Check out the web client demo: https://audiobooks.dev/ (thanks for hosting
|
||||||
|
[@Vito0912](https://github.com/Vito0912)!)
|
||||||
|
|
||||||
Username/password: `demo`/`demo` (user account)
|
Username/password: `demo`/`demo` (user account)
|
||||||
|
|
||||||
### Android App (beta)
|
### Android App (beta)
|
||||||
|
|
||||||
Try it out on the [Google Play Store](https://play.google.com/store/apps/details?id=com.audiobookshelf.app)
|
Try it out on the
|
||||||
|
[Google Play Store](https://play.google.com/store/apps/details?id=com.audiobookshelf.app)
|
||||||
|
|
||||||
### iOS App (beta)
|
### iOS App (beta)
|
||||||
|
|
||||||
**Beta is currently full. Apple has a hard limit of 10k beta testers. Updates will be posted in Discord.**
|
**Beta is currently full. Apple has a hard limit of 10k beta testers. Updates
|
||||||
|
will be posted in Discord.**
|
||||||
|
|
||||||
Using Test Flight: https://testflight.apple.com/join/wiic7QIW **_(beta is full)_**
|
Using Test Flight: https://testflight.apple.com/join/wiic7QIW **_(beta is
|
||||||
|
full)_**
|
||||||
|
|
||||||
### Build your own tools & clients
|
### Build your own tools & clients
|
||||||
|
|
||||||
|
|
@ -71,7 +82,9 @@ Check out the [API documentation](https://api.audiobookshelf.org/)
|
||||||
|
|
||||||
#### Directory structure and folder names are important to Audiobookshelf!
|
#### Directory structure and folder names are important to Audiobookshelf!
|
||||||
|
|
||||||
See [documentation](https://audiobookshelf.org/docs#book-directory-structure) for supported directory structure, folder naming conventions, and audio file metadata usage.
|
See [documentation](https://audiobookshelf.org/docs#book-directory-structure)
|
||||||
|
for supported directory structure, folder naming conventions, and audio file
|
||||||
|
metadata usage.
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
@ -95,7 +108,8 @@ Toggle websockets support.
|
||||||
|
|
||||||
### NGINX Reverse Proxy
|
### NGINX Reverse Proxy
|
||||||
|
|
||||||
Add this to the site config file on your nginx server after you have changed the relevant parts in the <> brackets, and inserted your certificate paths.
|
Add this to the site config file on your nginx server after you have changed the
|
||||||
|
relevant parts in the <> brackets, and inserted your certificate paths.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
server {
|
server {
|
||||||
|
|
@ -130,7 +144,8 @@ server {
|
||||||
|
|
||||||
### Apache Reverse Proxy
|
### Apache Reverse Proxy
|
||||||
|
|
||||||
Add this to the site config file on your Apache server after you have changed the relevant parts in the <> brackets, and inserted your certificate paths.
|
Add this to the site config file on your Apache server after you have changed
|
||||||
|
the relevant parts in the <> brackets, and inserted your certificate paths.
|
||||||
|
|
||||||
For this to work you must enable at least the following mods using `a2enmod`:
|
For this to work you must enable at least the following mods using `a2enmod`:
|
||||||
|
|
||||||
|
|
@ -164,7 +179,8 @@ For this to work you must enable at least the following mods using `a2enmod`:
|
||||||
</IfModule>
|
</IfModule>
|
||||||
```
|
```
|
||||||
|
|
||||||
If using Apache >= 2.4.47 you can use the following, without having to use any of the `RewriteEngine`, `RewriteCond`, or `RewriteRule` directives. For example:
|
If using Apache >= 2.4.47 you can use the following, without having to use any
|
||||||
|
of the `RewriteEngine`, `RewriteCond`, or `RewriteRule` directives. For example:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<Location /audiobookshelf>
|
<Location /audiobookshelf>
|
||||||
|
|
@ -174,7 +190,10 @@ If using Apache >= 2.4.47 you can use the following, without having to use any o
|
||||||
</Location>
|
</Location>
|
||||||
```
|
```
|
||||||
|
|
||||||
Some SSL certificates like those signed by Let's Encrypt require ACME validation. To allow Let's Encrypt to write and confirm the ACME challenge, edit your VirtualHost definition to prevent proxying traffic that queries `/.well-known` and instead serve that directly:
|
Some SSL certificates like those signed by Let's Encrypt require ACME
|
||||||
|
validation. To allow Let's Encrypt to write and confirm the ACME challenge, edit
|
||||||
|
your VirtualHost definition to prevent proxying traffic that queries
|
||||||
|
`/.well-known` and instead serve that directly:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
|
|
@ -245,7 +264,9 @@ Some SSL certificates like those signed by Let's Encrypt require ACME validation
|
||||||
|
|
||||||
### [Traefik Reverse Proxy](https://doc.traefik.io/traefik/)
|
### [Traefik Reverse Proxy](https://doc.traefik.io/traefik/)
|
||||||
|
|
||||||
Middleware relating to CORS will cause the app to report Unknown Error when logging in. To prevent this don't apply any of the following headers to the router for this site:
|
Middleware relating to CORS will cause the app to report Unknown Error when
|
||||||
|
logging in. To prevent this don't apply any of the following headers to the
|
||||||
|
router for this site:
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>accessControlAllowMethods</li>
|
<li>accessControlAllowMethods</li>
|
||||||
|
|
@ -253,7 +274,11 @@ Middleware relating to CORS will cause the app to report Unknown Error when logg
|
||||||
<li>accessControlMaxAge</li>
|
<li>accessControlMaxAge</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
From [@Dondochaka](https://discord.com/channels/942908292873723984/942914154254176257/945074590374318170) and [@BeastleeUK](https://discord.com/channels/942908292873723984/942914154254176257/970366039294611506) <br />
|
From
|
||||||
|
[@Dondochaka](https://discord.com/channels/942908292873723984/942914154254176257/945074590374318170)
|
||||||
|
and
|
||||||
|
[@BeastleeUK](https://discord.com/channels/942908292873723984/942914154254176257/970366039294611506)
|
||||||
|
<br />
|
||||||
|
|
||||||
### Example Caddyfile - [Caddy Reverse Proxy](https://caddyserver.com/docs/caddyfile/directives/reverse_proxy)
|
### Example Caddyfile - [Caddy Reverse Proxy](https://caddyserver.com/docs/caddyfile/directives/reverse_proxy)
|
||||||
|
|
||||||
|
|
@ -304,7 +329,6 @@ backend default_backend
|
||||||
|
|
||||||
# Define the server for the default backend
|
# Define the server for the default backend
|
||||||
server default_server 127.0.0.123:8081
|
server default_server 127.0.0.123:8081
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### pfSense and HAProxy
|
### pfSense and HAProxy
|
||||||
|
|
@ -342,10 +366,13 @@ The `Name` needs to match the `Parameters` above `audiobookshelf`.
|
||||||
|
|
||||||
##### Health checking:
|
##### Health checking:
|
||||||
|
|
||||||
Health checking is enabled by default. `Http check method` of `OPTIONS` is not supported on Audiobookshelf. If Health check fails, data will not be forwared. Need to do one of following:
|
Health checking is enabled by default. `Http check method` of `OPTIONS` is not
|
||||||
|
supported on Audiobookshelf. If Health check fails, data will not be forwared.
|
||||||
|
Need to do one of following:
|
||||||
|
|
||||||
- To disable: Change `Health check method` to `none`.
|
- To disable: Change `Health check method` to `none`.
|
||||||
- To make Health checking function: Change `Http check method` to `HEAD` or `GET`.
|
- To make Health checking function: Change `Http check method` to `HEAD` or
|
||||||
|
`GET`.
|
||||||
|
|
||||||
# Run from source
|
# Run from source
|
||||||
|
|
||||||
|
|
@ -355,18 +382,28 @@ This application is built using [NodeJs](https://nodejs.org/).
|
||||||
|
|
||||||
### Localization
|
### Localization
|
||||||
|
|
||||||
Thank you to [Weblate](https://hosted.weblate.org/engage/audiobookshelf/) for hosting our localization infrastructure pro-bono. If you want to see Audiobookshelf in your language, please help us localize. Additional information on helping with the translations [here](https://www.audiobookshelf.org/faq#how-do-i-help-with-translations). <a href="https://hosted.weblate.org/engage/audiobookshelf/"> <img src="https://hosted.weblate.org/widget/audiobookshelf/abs-web-client/horizontal-auto.svg" alt="Translation status" /> </a>
|
Thank you to [Weblate](https://hosted.weblate.org/engage/audiobookshelf/) for
|
||||||
|
hosting our localization infrastructure pro-bono. If you want to see
|
||||||
|
Audiobookshelf in your language, please help us localize. Additional information
|
||||||
|
on helping with the translations
|
||||||
|
[here](https://www.audiobookshelf.org/faq#how-do-i-help-with-translations).
|
||||||
|
<a href="https://hosted.weblate.org/engage/audiobookshelf/">
|
||||||
|
<img src="https://hosted.weblate.org/widget/audiobookshelf/abs-web-client/horizontal-auto.svg" alt="Translation status" />
|
||||||
|
</a>
|
||||||
|
|
||||||
### Dev Container Setup
|
### Dev Container Setup
|
||||||
|
|
||||||
The easiest way to begin developing this project is to use a dev container. An introduction to dev containers in VSCode can be found [here](https://code.visualstudio.com/docs/devcontainers/containers).
|
The easiest way to begin developing this project is to use a dev container. An
|
||||||
|
introduction to dev containers in VSCode can be found
|
||||||
|
[here](https://code.visualstudio.com/docs/devcontainers/containers).
|
||||||
|
|
||||||
Required Software:
|
Required Software:
|
||||||
|
|
||||||
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
|
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
|
||||||
- [VSCode](https://code.visualstudio.com/download)
|
- [VSCode](https://code.visualstudio.com/download)
|
||||||
|
|
||||||
_Note, it is possible to use other container software than Docker and IDEs other than VSCode. However, this setup is more complicated and not covered here._
|
_Note, it is possible to use other container software than Docker and IDEs other
|
||||||
|
than VSCode. However, this setup is more complicated and not covered here._
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<details>
|
<details>
|
||||||
|
|
@ -413,15 +450,24 @@ sudo snap install code --classic
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
After installing these packages, you can now install the [Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) extension for VSCode. After installing this extension open the command pallet (`ctrl+shift+p` or `cmd+shift+p`) and select the command `>Dev Containers: Rebuild and Reopen in Container`. This will cause the development environment container to be built and launched.
|
After installing these packages, you can now install the
|
||||||
|
[Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)
|
||||||
|
extension for VSCode. After installing this extension open the command pallet
|
||||||
|
(`ctrl+shift+p` or `cmd+shift+p`) and select the command
|
||||||
|
`>Dev Containers: Rebuild and Reopen in Container`. This will cause the
|
||||||
|
development environment container to be built and launched.
|
||||||
|
|
||||||
You are now ready to start development!
|
You are now ready to start development!
|
||||||
|
|
||||||
### Manual Environment Setup
|
### Manual Environment Setup
|
||||||
|
|
||||||
If you don't want to use the dev container, you can still develop this project. First, you will need to install [NodeJs](https://nodejs.org/) (version 20) and [FFmpeg](https://ffmpeg.org/).
|
If you don't want to use the dev container, you can still develop this project.
|
||||||
|
First, you will need to install [NodeJs](https://nodejs.org/) (version 20) and
|
||||||
|
[FFmpeg](https://ffmpeg.org/).
|
||||||
|
|
||||||
Next you will need to create a `dev.js` file in the project's root directory. This contains configuration information and paths unique to your development environment. You can find an example of this file in `.devcontainer/dev.js`.
|
Next you will need to create a `dev.js` file in the project's root directory.
|
||||||
|
This contains configuration information and paths unique to your development
|
||||||
|
environment. You can find an example of this file in `.devcontainer/dev.js`.
|
||||||
|
|
||||||
You are now ready to build the client:
|
You are now ready to build the client:
|
||||||
|
|
||||||
|
|
@ -435,13 +481,28 @@ cd ..
|
||||||
|
|
||||||
### Development Commands
|
### Development Commands
|
||||||
|
|
||||||
After setting up your development environment, either using the dev container or using your own custom environment, the following commands will help you run the server and client.
|
After setting up your development environment, either using the dev container or
|
||||||
|
using your own custom environment, the following commands will help you run the
|
||||||
|
server and client.
|
||||||
|
|
||||||
To run the server, you can use the command `npm run dev`. This will use the client that was built when you ran `npm run generate` in the client directory or when you started the dev container. If you make changes to the server, you will need to restart the server. If you make changes to the client, you will need to run the command `(cd client; npm run generate)` and then restart the server. By default the client runs at `localhost:3333`, though the port can be configured in `dev.js`.
|
To run the server, you can use the command `npm run dev`. This will use the
|
||||||
|
client that was built when you ran `npm run generate` in the client directory or
|
||||||
|
when you started the dev container. If you make changes to the server, you will
|
||||||
|
need to restart the server. If you make changes to the client, you will need to
|
||||||
|
run the command `(cd client; npm run generate)` and then restart the server. By
|
||||||
|
default the client runs at `localhost:3333`, though the port can be configured
|
||||||
|
in `dev.js`.
|
||||||
|
|
||||||
You can also build a version of the client that supports live reloading. To do this, start the server, then run the command `(cd client; npm run dev)`. This will run a separate instance of the client at `localhost:3000` that will be automatically updated as you make changes to the client.
|
You can also build a version of the client that supports live reloading. To do
|
||||||
|
this, start the server, then run the command `(cd client; npm run dev)`. This
|
||||||
|
will run a separate instance of the client at `localhost:3000` that will be
|
||||||
|
automatically updated as you make changes to the client.
|
||||||
|
|
||||||
If you are using VSCode, this project includes a couple of pre-defined targets to speed up this process. First, if you build the project (`ctrl+shift+b` or `cmd+shift+b`) it will automatically generate the client. Next, there are debug commands for running the server and client. You can view these targets using the debug panel (bring it up with (`ctrl+shift+d` or `cmd+shift+d`):
|
If you are using VSCode, this project includes a couple of pre-defined targets
|
||||||
|
to speed up this process. First, if you build the project (`ctrl+shift+b` or
|
||||||
|
`cmd+shift+b`) it will automatically generate the client. Next, there are debug
|
||||||
|
commands for running the server and client. You can view these targets using the
|
||||||
|
debug panel (bring it up with (`ctrl+shift+d` or `cmd+shift+d`):
|
||||||
|
|
||||||
- `Debug server`—Run the server.
|
- `Debug server`—Run the server.
|
||||||
- `Debug client (nuxt)`—Run the client with live reload.
|
- `Debug client (nuxt)`—Run the client with live reload.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue