|
2 | 2 |
|
3 | 3 | ### A fast and easy-to-use CDN, built with Go.
|
4 | 4 |
|
5 |
| -My first Go project. <br> |
6 |
| -Utilizing a PostgreSQL database with GORM and the Gin web-framework. |
| 5 | +Utilizing a SQLite database with GORM and the Gin web-framework. UI built with [Vite](https://vite.js/) + [React](https://react.dev/) and [wouter](https://github.com/molefrog/wouter). |
7 | 6 |
|
8 | 7 | ## How to use
|
9 | 8 |
|
10 |
| -Visit the API documentation at [go-fast-cdn.redoc.ly](https://go-fast-cdn.redoc.ly/) |
| 9 | +See the API documentation at [go-fast-cdn.redoc.ly](https://go-fast-cdn.redoc.ly/) |
11 | 10 |
|
12 | 11 | ## Development
|
13 | 12 |
|
14 |
| -1. **Clone the Repository** <br> |
15 |
| - `git clone git@github.com:kevinanielsen/go-fast-cdn` |
16 |
| - or `git clone https://github.com:kevinanielsen/go-fast-cdn` |
17 |
| -2. **Add env variables** <br> |
18 |
| - This project uses [dotenv](https://vault.dotenv.org/) and I recommend that you do the same. <br> |
19 |
| - Read more abou the usage on their page. <br><br> |
20 |
| - If you do not wish to use this, you can just rename `.example.env` to `.env` and fill in the fields. |
21 |
| -3. **Set the main.db** <br> |
22 |
| - This project uses an SQLite database. To start, you need to rename `.example.db` to `main.db`. |
| 13 | +### Clone the Repository |
| 14 | + |
| 15 | +`git clone git@github.com:kevinanielsen/go-fast-cdn` |
| 16 | +or `git clone https://github.com:kevinanielsen/go-fast-cdn` |
| 17 | + |
| 18 | +### Add env variables |
| 19 | + |
| 20 | +This project uses [dotenv](https://vault.dotenv.org/) and I recommend that you do the same. <br> |
| 21 | +Read more abou the usage on their page. <br><br> |
| 22 | +If you do not wish to use this, you can just rename `.example.env` to `.env` and fill in the fields. |
| 23 | + |
| 24 | +### Set the main.db |
| 25 | + |
| 26 | +This project uses an SQLite database. To start, you need to rename `.example.db` to `main.db`. |
| 27 | + |
| 28 | +### Building the binary |
| 29 | + |
| 30 | +1. Go to `/ui` and run `pnpm i`. |
| 31 | +2. Run `pnpm build` to build the ui. |
| 32 | +3. Go to the root of the project and run `go build` to build the binary. The ui files should be embedded in the binary automatically. Then you can run the binary with `./go-fast-cdn` |
0 commit comments