Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Update .gitignore and readme #5

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ uploads/*
tmp

main.db
ui/build
ui/build

bin
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,31 @@

### A fast and easy-to-use CDN, built with Go.

My first Go project. <br>
Utilizing a PostgreSQL database with GORM and the Gin web-framework.
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).

## How to use

Visit the API documentation at [go-fast-cdn.redoc.ly](https://go-fast-cdn.redoc.ly/)
See the API documentation at [go-fast-cdn.redoc.ly](https://go-fast-cdn.redoc.ly/)

## Development

1. **Clone the Repository** <br>
`git clone git@github.com:kevinanielsen/go-fast-cdn`
or `git clone https://github.com:kevinanielsen/go-fast-cdn`
2. **Add env variables** <br>
This project uses [dotenv](https://vault.dotenv.org/) and I recommend that you do the same. <br>
Read more abou the usage on their page. <br><br>
If you do not wish to use this, you can just rename `.example.env` to `.env` and fill in the fields.
3. **Set the main.db** <br>
This project uses an SQLite database. To start, you need to rename `.example.db` to `main.db`.
### Clone the Repository

`git clone git@github.com:kevinanielsen/go-fast-cdn`
or `git clone https://github.com:kevinanielsen/go-fast-cdn`

### Add env variables

This project uses [dotenv](https://vault.dotenv.org/) and I recommend that you do the same. <br>
Read more abou the usage on their page. <br><br>
If you do not wish to use this, you can just rename `.example.env` to `.env` and fill in the fields.

### Set the main.db

This project uses an SQLite database. To start, you need to rename `.example.db` to `main.db`.

### Building the binary

1. Go to `/ui` and run `pnpm i`.
2. Run `pnpm build` to build the ui.
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`