Run server on port 3001 (#687)

* Simplify docker compose file

* Run on port 3001
This commit is contained in:
Sung 2025-10-11 12:41:51 -07:00 committed by GitHub
commit ca5af5e34a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 45 additions and 36 deletions

View file

@ -57,7 +57,7 @@ build() {
# build binary
destDir="$outputDir/$platform-$arch"
ldflags="-X main.apiEndpoint=https://localhost:3000/api -X main.versionTag=$version"
ldflags="-X main.apiEndpoint=https://localhost:3001/api -X main.versionTag=$version"
tags="fts5"
pushd "$projectDir"

View file

@ -6,6 +6,6 @@ dir=$(dirname "${BASH_SOURCE[0]}")
sudo rm -rf "$(which dnote)" "$GOPATH/bin/cli"
# change tags to darwin if on macos
go install -ldflags "-X main.apiEndpoint=http://127.0.0.1:3000/api" --tags "linux fts5" "$dir/../../pkg/cli"
go install -ldflags "-X main.apiEndpoint=http://127.0.0.1:3001/api" --tags "linux fts5" "$dir/../../pkg/cli"
sudo ln -s "$GOPATH/bin/cli" /usr/local/bin/dnote

View file

@ -9,5 +9,5 @@ source "$basePath/pkg/server/.env.test"
set +a
pushd "$basePath"/pkg/e2e
go test --tags "fts5" ./... -p 1
go test --tags "fts5" ./... -p 1 -v -timeout 5m
popd

View file

@ -23,7 +23,7 @@ cp "$basePath"/pkg/server/assets/static/* "$basePath/pkg/server/static"
# run server
moduleName="github.com/dnote/dnote"
ldflags="-X '$moduleName/pkg/server/buildinfo.CSSFiles=main.css' -X '$moduleName/pkg/server/buildinfo.JSFiles=main.js' -X '$moduleName/pkg/server/buildinfo.Version=dev' -X '$moduleName/pkg/server/buildinfo.Standalone=true'"
task="go run -ldflags \"$ldflags\" --tags fts5 main.go start -port 3000"
task="go run -ldflags \"$ldflags\" --tags fts5 main.go start -port 3001"
(
cd "$basePath/pkg/watcher" && \