This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load("@io_bazel_rules_go//go:def.bzl", "go_library") | |
| go_library( | |
| name = "health", | |
| srcs = ["health.go"], | |
| importpath = "go_monogrepo/packages/shared/handlers/health", | |
| visibility = ["//visibility:public"], | |
| deps = [ | |
| "@com_github_gin_gonic_gin//:go_default_library" | |
| ] | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load("@io_bazel_rules_go//go:def.bzl", "go_library") | |
| go_library( | |
| name = "router", | |
| srcs = ["router.go"], | |
| importpath = "go_monogrepo/packages/main_app/router", | |
| visibility = ["//visibility:public"], | |
| deps = [ | |
| "//packages/shared/handlers/health:health", | |
| "@com_github_gin_gonic_gin//:go_default_library" | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package router | |
| import ( | |
| "github.com/gin-gonic/gin" | |
| "go_monogrepo/packages/shared/handlers/health" | |
| ) | |
| func GetEngine() *gin.Engine { | |
| r := gin.New() | |
| r.Use(gin.Recovery()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test") | |
| go_binary( | |
| name = "main_app", | |
| srcs = ["main.go"], | |
| importpath = "go_monogrepo/packages/main", | |
| deps = [ | |
| "//packages/main_app/router:router" | |
| ], | |
| ) | |
| go_test( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| load("@bazel_gazelle//:def.bzl", "gazelle") | |
| gazelle(name = "gazelle") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| workspace(name = "go_monorepo") | |
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
| http_archive( | |
| name = "io_bazel_rules_go", | |
| urls = [ | |
| "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.19.5/rules_go-v0.19.5.tar.gz", | |
| "https://github.com/bazelbuild/rules_go/releases/download/v0.19.5/rules_go-v0.19.5.tar.gz", | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createComponent, Component, rValue, bootstrap} from 'revact'; | |
| class Comp extends Component { | |
| reactive = { | |
| show: rValue(true), | |
| text: rValue("Here timer") | |
| } | |
| get show() { | |
| return this.reactive.show; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| render() { | |
| const cond = true; | |
| return { | |
| <div> | |
| { cond ? <Component/> : (null) } | |
| </div> | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { bootstrap, Component, rValue, createComponent, createRouter, Router, rList } from 'revact'; | |
| class Counter extends Component { | |
| reactive = { | |
| counter: rValue(0) | |
| } | |
| template = { | |
| tag: "span", | |
| textValue: this.reactive.counter, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { bootstrap, Component, rValue, createComponent } from 'revact'; | |
| class Counter extends Component { | |
| reactive = { | |
| counter: rValue(0) | |
| } | |
| template = { | |
| tag: "span", | |
| textValue: this.reactive.counter, |