Skip to content
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
5 changes: 4 additions & 1 deletion examples/counter/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
// Flags / environment:
//
// PORT listen port (default 8080)
// LVT_DEV_MODE=true alias for --dev (set by e2etest.StartTestServer so the
// subprocess inherits dev-mode without needing to pass
// flags through the test harness)
// --dev relax origin checks for localhost development (so the
// WebSocket upgrader accepts requests from arbitrary
// localhost ports); the production allowlist applies when
Expand Down Expand Up @@ -35,7 +38,7 @@ func main() {
}

var opts []livetemplate.Option
if *dev {
if *dev || os.Getenv("LVT_DEV_MODE") == "true" {
opts = append(opts,
livetemplate.WithDevMode(true),
livetemplate.WithPermissiveOriginCheck(),
Expand Down
5 changes: 4 additions & 1 deletion examples/login/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// Flags / environment:
//
// PORT listen port (default 8080)
// LVT_DEV_MODE=true alias for --dev (set by e2etest.StartTestServer so the
// subprocess inherits dev-mode without needing to pass
// flags through the test harness)
// MOUNT_PATH mount path (default "/")
// --dev relax origin checks for localhost development and enable
// livetemplate's DevMode. Production allowlist applies when
Expand Down Expand Up @@ -48,7 +51,7 @@ func main() {
}

var opts []livetemplate.Option
if *dev {
if *dev || os.Getenv("LVT_DEV_MODE") == "true" {
opts = append(opts,
livetemplate.WithDevMode(true),
livetemplate.WithPermissiveOriginCheck(),
Expand Down
5 changes: 4 additions & 1 deletion examples/patterns/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
// Flags / environment:
//
// PORT listen port (default 8080)
// LVT_DEV_MODE=true alias for --dev (set by e2etest.StartTestServer so the
// subprocess inherits dev-mode without needing to pass
// flags through the test harness)
// --dev relax origin checks for localhost development and enable
// livetemplate's DevMode (verbose logging tests capture).
// The production allowlist applies when absent.
Expand All @@ -43,7 +46,7 @@ func main() {
}

var opts []livetemplate.Option
if *dev {
if *dev || os.Getenv("LVT_DEV_MODE") == "true" {
opts = append(opts,
livetemplate.WithDevMode(true),
livetemplate.WithPermissiveOriginCheck(),
Expand Down
5 changes: 4 additions & 1 deletion examples/progressive-enhancement/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
// Flags / environment:
//
// PORT listen port (default 8080)
// LVT_DEV_MODE=true alias for --dev (set by e2etest.StartTestServer so the
// subprocess inherits dev-mode without needing to pass
// flags through the test harness)
// --dev relax origin checks for localhost development and enable
// livetemplate's DevMode (verbose logging tests capture).
// The production allowlist applies when absent.
Expand All @@ -47,7 +50,7 @@ func main() {
}

var baseOpts []livetemplate.Option
if *dev {
if *dev || os.Getenv("LVT_DEV_MODE") == "true" {
baseOpts = append(baseOpts,
livetemplate.WithDevMode(true),
livetemplate.WithPermissiveOriginCheck(),
Expand Down
5 changes: 4 additions & 1 deletion examples/shared-notepad/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
// Flags / environment:
//
// PORT listen port (default 8080)
// LVT_DEV_MODE=true alias for --dev (set by e2etest.StartTestServer so the
// subprocess inherits dev-mode without needing to pass
// flags through the test harness)
// --dev relax origin checks for localhost development and enable
// livetemplate's DevMode. Production allowlist applies when
// absent.
Expand Down Expand Up @@ -38,7 +41,7 @@ func main() {
opts := []livetemplate.Option{
livetemplate.WithAuthenticator(notepad.NewDemoBasicAuth()),
}
if *dev {
if *dev || os.Getenv("LVT_DEV_MODE") == "true" {
opts = append(opts,
livetemplate.WithDevMode(true),
livetemplate.WithPermissiveOriginCheck(),
Expand Down
5 changes: 4 additions & 1 deletion examples/todos/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// Flags / environment:
//
// PORT listen port (default 8080)
// LVT_DEV_MODE=true alias for --dev (set by e2etest.StartTestServer so the
// subprocess inherits dev-mode without needing to pass
// flags through the test harness)
// --dev relax origin checks for localhost development and enable
// livetemplate's DevMode (verbose logging the e2e framework
// captures). The production allowlist applies when absent.
Expand All @@ -38,7 +41,7 @@ func main() {
}

var opts []livetemplate.Option
if *dev {
if *dev || os.Getenv("LVT_DEV_MODE") == "true" {
opts = append(opts,
livetemplate.WithDevMode(true),
livetemplate.WithPermissiveOriginCheck(),
Expand Down
Loading