chore: setup go project
This commit is contained in:
parent
2efa42651f
commit
e1e12844a5
3 changed files with 32 additions and 1 deletions
23
README.md
23
README.md
|
@ -1,3 +1,24 @@
|
|||
# short
|
||||
|
||||
URL Shortener written in Go
|
||||
URL Shortener written in Go.
|
||||
|
||||
# Requirements
|
||||
|
||||
- [go 1.21.6 or more](https://go.dev/doc/install)
|
||||
- [Docker](https://www.docker.com/)
|
||||
- [atlas](https://atlasgo.io/getting-started)
|
||||
- [sqlc](https://docs.sqlc.dev/en/stable/overview/install.html)
|
||||
- [just](https://github.com/casey/just#installation) (optional)
|
||||
|
||||
> [!NOTE]
|
||||
> If you are using [Nix](https://nixos.org/), you can just run `nix develop .` or `direnv allow` if you use Direnv.
|
||||
|
||||
# Running the app
|
||||
|
||||
Once you have installed all requirements, you can simply do:
|
||||
|
||||
```sh
|
||||
docker compose up -d
|
||||
just migrate # or atlas migrate apply --env local
|
||||
go run .
|
||||
```
|
||||
|
|
3
go.mod
Normal file
3
go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module github.com/babariviere/short
|
||||
|
||||
go 1.21.6
|
7
main.go
Normal file
7
main.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello, short!")
|
||||
}
|
Loading…
Reference in a new issue