Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lemon001017/http-download-server-golang

A website that supports HTTP downloads, pauses, resumes, redownloads, deletes, rate-limiting, and parallel multitasking downloads.
https://github.com/lemon001017/http-download-server-golang

gin gorm sqlite tailwindui

Last synced: about 1 month ago
JSON representation

A website that supports HTTP downloads, pauses, resumes, redownloads, deletes, rate-limiting, and parallel multitasking downloads.

Awesome Lists containing this project

README

        

# HTTP-download-server (Go version)

## Technology Used

Web: `Alpinejs` + `Tailwindcss` + `heroicons`

Server: `Go` + `Gin` + `Gorm` + `carrot` + `SQLite`

## Run locally

## Web

### 1. Install the vscode plugin

Click -> [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) or Search `Live
Server` in vscode

### 2. Modify settings.json (Required)

- Enter into Settings
- Search `live server settings ignore files`
- Click `Edit in settings.json`
- Add the following:

```
"liveServer.settings.ignoreFiles": [
"**/server/**/*",
"**/*.go",
"**/*.db",
]
```

- Restart vscode

### 3. Run

```shell
cd ui
cd public/index.html
```

Right click the mouse to select -> `Open with Live Server`

## Go

### 1. Download project

```shell
git clone https://github.com/Lemon001017/HTTP-download-server.git
```

### 2. Install dependencies

```shell
cd server
go mod tidy
go mod download
```

### 3. Unit Test

```shell
go test ./...
```

### 4. Run

```shell
cd cmd
go run . -dsn file:dev.db
```

### Show api docs

```shell
http://localhost:8000/api/docs/
```