@@ -714,7 +714,7 @@ By default APIs deployed by Nitric will be assigned a domain by the target cloud
714
714
715
715
<TabItem label = " AWS" >
716
716
717
- ``` yaml file :nitric.prod.yaml
717
+ ``` yaml title :nitric.prod.yaml
718
718
provider :
nitric/[email protected]
719
719
region : ap-southeast-2
720
720
@@ -731,15 +731,15 @@ apis:
731
731
732
732
<TabItem label="Azure">
733
733
734
- ` ` ` yaml file :nitric.prod.yaml
734
+ ` ` ` yaml title :nitric.prod.yaml
735
735
# currently unsupported - request support here: https://github.com/nitrictech/nitric/issues
736
736
```
737
737
738
738
</TabItem >
739
739
740
740
<TabItem label = " Google Cloud" >
741
741
742
- ``` yaml file :nitric.prod.yaml
742
+ ``` yaml title :nitric.prod.yaml
743
743
# currently unsupported - request support here: https://github.com/nitrictech/nitric/issues
744
744
```
745
745
@@ -755,7 +755,7 @@ By default, APIs will not be deployed with a description. You can add a descript
755
755
756
756
<TabItem label = " AWS" >
757
757
758
- ``` yaml file :nitric.prod.yaml
758
+ ``` yaml title :nitric.prod.yaml
759
759
provider :
nitric/[email protected]
760
760
region : ap-southeast-2
761
761
@@ -771,7 +771,7 @@ apis:
771
771
772
772
<TabItem label="Azure">
773
773
774
- ` ` ` yaml file :nitric.prod.yaml
774
+ ` ` ` yaml title :nitric.prod.yaml
775
775
provider :
nitric/[email protected]
776
776
region : Australia East
777
777
org : example-org
@@ -788,7 +788,7 @@ apis:
788
788
789
789
<TabItem label="Google Cloud">
790
790
791
- ` ` ` yaml file :nitric.prod.yaml
791
+ ` ` ` yaml title :nitric.prod.yaml
792
792
provider :
nitric/[email protected]
793
793
region : australia-southeast1
794
794
@@ -857,7 +857,7 @@ Since resource names are unique across each Nitric project, you can access a res
857
857
858
858
<CodeSwitcher>
859
859
860
- ` ` ` javascript !! file :services/one.js
860
+ ` ` ` javascript !! title :services/one.js
861
861
import { api } from '@nitric/sdk'
862
862
863
863
const accountsApi = api('accounts')
@@ -867,7 +867,7 @@ accountsApi.get('/users/:id', async () => {
867
867
})
868
868
` ` `
869
869
870
- ` ` ` python !! file :services/one.py
870
+ ` ` ` python !! title :services/one.py
871
871
from nitric.application import Nitric
872
872
from nitric.context import HttpContext
873
873
from nitric.resources import api
@@ -881,7 +881,7 @@ async def get_user(ctx: HttpContext):
881
881
Nitric.run()
882
882
` ` `
883
883
884
- ` ` ` go !! file :services/one/main.go
884
+ ` ` ` go !! title :services/one/main.go
885
885
import (
886
886
"github.com/nitrictech/go-sdk/nitric"
887
887
"github.com/nitrictech/go-sdk/nitric/apis"
@@ -898,7 +898,7 @@ func main() {
898
898
}
899
899
` ` `
900
900
901
- ` ` ` dart !! file :services/one.dart
901
+ ` ` ` dart !! title :services/one.dart
902
902
import 'package:nitric_sdk/nitric.dart';
903
903
904
904
final accountsApi = Nitric.api("accounts");
@@ -912,7 +912,7 @@ galaxyApi.get("/users/:id", (ctx) async {
912
912
913
913
<CodeSwitcher>
914
914
915
- ` ` ` javascript !! file :services/two.js
915
+ ` ` ` javascript !! title :services/two.js
916
916
import { api } from '@nitric/sdk'
917
917
918
918
const accountsApi = api('accounts')
@@ -922,7 +922,7 @@ accountsApi.get('/orgs/:id', async () => {
922
922
})
923
923
` ` `
924
924
925
- ` ` ` python !! file :services/two.py
925
+ ` ` ` python !! title :services/two.py
926
926
from nitric.application import Nitric
927
927
from nitric.context import HttpContext
928
928
from nitric.resources import api
@@ -936,7 +936,7 @@ async def get_org(ctx: HttpContext):
936
936
Nitric.run()
937
937
` ` `
938
938
939
- ` ` ` go !! file :services/two/main.go
939
+ ` ` ` go !! title :services/two/main.go
940
940
import (
941
941
"github.com/nitrictech/go-sdk/nitric"
942
942
"github.com/nitrictech/go-sdk/nitric/apis"
@@ -953,7 +953,7 @@ func main() {
953
953
}
954
954
` ` `
955
955
956
- ` ` ` dart !! file :services/two.dart
956
+ ` ` ` dart !! title :services/two.dart
957
957
import 'package:nitric_sdk/nitric.dart';
958
958
959
959
final accountsApi = Nitric.api("accounts");
@@ -978,19 +978,19 @@ Here is the same example enhanced to import a common API resource.
978
978
979
979
<CodeSwitcher>
980
980
981
- ` ` ` javascript !! file :resources/index.js
981
+ ` ` ` javascript !! title :resources/index.js
982
982
import { api } from '@nitric/sdk'
983
983
984
984
export const accountsApi = api('accounts')
985
985
` ` `
986
986
987
- ` ` ` python !! file :common/resources.py
987
+ ` ` ` python !! title :common/resources.py
988
988
from nitric.resources import api
989
989
990
990
accounts_api = api('accounts')
991
991
` ` `
992
992
993
- ` ` ` go !! file :resources/main.go
993
+ ` ` ` go !! title :resources/main.go
994
994
import (
995
995
"github.com/nitrictech/go-sdk/nitric"
996
996
"github.com/nitrictech/go-sdk/nitric/apis"
@@ -1004,7 +1004,7 @@ func init() {
1004
1004
}
1005
1005
` ` `
1006
1006
1007
- ` ` ` dart !! file :common/resources.dart
1007
+ ` ` ` dart !! title :common/resources.dart
1008
1008
import 'package:nitric_sdk/nitric.dart';
1009
1009
1010
1010
final accountsApi = Nitric.api("accounts");
@@ -1014,15 +1014,15 @@ final accountsApi = Nitric.api("accounts");
1014
1014
1015
1015
<CodeSwitcher>
1016
1016
1017
- ` ` ` javascript !! file :services/one.js
1017
+ ` ` ` javascript !! title :services/one.js
1018
1018
import { accountsApi } from '../resources'
1019
1019
1020
1020
accountsApi.get('/users/:id', async () => {
1021
1021
// your logic here
1022
1022
})
1023
1023
` ` `
1024
1024
1025
- ` ` ` python !! file :services/one.py
1025
+ ` ` ` python !! title :services/one.py
1026
1026
from nitric.application import Nitric
1027
1027
from nitric.context import HttpContext
1028
1028
from common.resources import accounts_api
@@ -1035,7 +1035,7 @@ async def get_user(ctx: HttpContext):
1035
1035
Nitric.run()
1036
1036
` ` `
1037
1037
1038
- ` ` ` go !! file :services/one/main.go
1038
+ ` ` ` go !! title :services/one/main.go
1039
1039
package main
1040
1040
1041
1041
import (
@@ -1054,7 +1054,7 @@ func main() {
1054
1054
}
1055
1055
` ` `
1056
1056
1057
- ` ` ` dart !! file :services/one.dart
1057
+ ` ` ` dart !! title :services/one.dart
1058
1058
import '../resources';
1059
1059
1060
1060
accountsApi.get("/users/:id", (ctx) async {
@@ -1066,15 +1066,15 @@ accountsApi.get("/users/:id", (ctx) async {
1066
1066
1067
1067
<CodeSwitcher>
1068
1068
1069
- ` ` ` javascript !! file :services/two.js
1069
+ ` ` ` javascript !! title :services/two.js
1070
1070
import { accountsApi } from '../resources'
1071
1071
1072
1072
accountsApi.get('/orgs/:id', async () => {
1073
1073
// your logic here
1074
1074
})
1075
1075
` ` `
1076
1076
1077
- ` ` ` python !! file :services/two.py
1077
+ ` ` ` python !! title :services/two.py
1078
1078
from nitric.application import Nitric
1079
1079
from nitric.context import HttpContext
1080
1080
from common.resources import accounts_api
@@ -1087,7 +1087,7 @@ async def get_org(ctx: HttpContext):
1087
1087
Nitric.run()
1088
1088
` ` `
1089
1089
1090
- ` ` ` go !! file :services/two/main.go
1090
+ ` ` ` go !! title :services/two/main.go
1091
1091
package main
1092
1092
1093
1093
import (
@@ -1106,7 +1106,7 @@ func main() {
1106
1106
}
1107
1107
` ` `
1108
1108
1109
- ` ` ` dart !! file :services/two.dart
1109
+ ` ` ` dart !! title :services/two.dart
1110
1110
import '../resources';
1111
1111
1112
1112
accountsApi.get("/orgs/:id", (ctx) async {
0 commit comments