Skip to content

Commit df34b13

Browse files
committed
refactor: make sure dist directory exists during development
1 parent 61dfc91 commit df34b13

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

Dockerfile.dev

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ COPY ./internal ./internal
1212
COPY ./main.go ./
1313
COPY ./air.toml ./
1414

15-
RUN mkdir -p ./internal/assets/dist && \
16-
echo "app running" > ./internal/assets/dist/index.html
17-
1815
RUN go install github.com/air-verse/air@v1.61.7
1916

2017
EXPOSE 3000

air.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ root = "/tinyauth"
22
tmp_dir = "tmp"
33

44
[build]
5+
pre_cmd = ["mkdir -p internal/assets/dist", "echo 'backend running' > internal/assets/dist/index.html"]
56
cmd = "go build -o ./tmp/tinyauth ."
67
bin = "tmp/tinyauth"
78
include_ext = ["go"]

0 commit comments

Comments
 (0)