File tree 7 files changed +93
-23
lines changed
7 files changed +93
-23
lines changed Original file line number Diff line number Diff line change
1
+ .DS_Store
2
+ node_modules
1
3
* .beam
2
4
* .ez
3
5
/build
4
6
erl_crash.dump
7
+
8
+ # sst
9
+ .sst
Original file line number Diff line number Diff line change 1
- # app
1
+ # Simple Example
2
2
3
- [ ![ Package Version] ( https://img.shields.io/hexpm/v/app )] ( https://hex.pm/packages/app )
4
- [ ![ Hex Docs] ( https://img.shields.io/badge/hex-docs-ffaff3 )] ( https://hexdocs.pm/app/ )
5
-
6
- ``` sh
7
- gleam add app@1
8
- ```
9
- ``` gleam
10
- import app
11
-
12
- pub fn main() {
13
- // TODO: An example of the project in use
14
- }
15
- ```
16
-
17
- Further documentation can be found at < https://hexdocs.pm/app > .
18
-
19
- ## Development
20
-
21
- ``` sh
22
- gleam run # Run the project
23
- gleam test # Run the tests
24
- ```
3
+ This is a simple lambda function that is build and deployed using SST.
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " simple" ,
3
+ "version" : " 1.0.0" ,
4
+ "type" : " module" ,
5
+ "scripts" : {
6
+ "dev" : " gleam build && sst dev"
7
+ },
8
+ "devDependencies" : {
9
+ "@types/aws-lambda" : " 8.10.145" ,
10
+ "@types/bun" : " latest"
11
+ },
12
+ "peerDependencies" : {
13
+ "typescript" : " ^5.0.0"
14
+ },
15
+ "dependencies" : {
16
+ "sst" : " 3.2.48"
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ /* This file is auto-generated by SST. Do not edit. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* deno-fmt-ignore-file */
5
+ import "sst"
6
+ export { }
7
+ declare module "sst" {
8
+ export interface Resource {
9
+ "SimpleExample" : {
10
+ "name" : string
11
+ "type" : "sst.aws.Function"
12
+ "url" : string
13
+ }
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ /// <reference path="./.sst/platform/config.d.ts" />
2
+
3
+ export default $config ( {
4
+ app ( input ) {
5
+ return {
6
+ name : "simple-example" ,
7
+ removal : input ?. stage === "production" ? "retain" : "remove" ,
8
+ home : "aws" ,
9
+ providers : {
10
+ aws : {
11
+ region : "us-east-1" ,
12
+ profile : "personal" ,
13
+ } ,
14
+ } ,
15
+ } ;
16
+ } ,
17
+ async run ( ) {
18
+ const api = new sst . aws . Function ( "SimpleExample" , {
19
+ handler : "build/dev/javascript/handler/handler.handler" ,
20
+ url : true ,
21
+ } ) ;
22
+ return {
23
+ url : api . url ,
24
+ } ;
25
+ } ,
26
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ // Enable latest features
4
+ "lib" : [" ESNext" , " DOM" ],
5
+ "target" : " ESNext" ,
6
+ "module" : " ESNext" ,
7
+ "moduleDetection" : " force" ,
8
+ "jsx" : " react-jsx" ,
9
+ "allowJs" : true ,
10
+
11
+ // Bundler mode
12
+ "moduleResolution" : " bundler" ,
13
+ "allowImportingTsExtensions" : true ,
14
+ "verbatimModuleSyntax" : true ,
15
+ "noEmit" : true ,
16
+
17
+ // Best practices
18
+ "strict" : true ,
19
+ "skipLibCheck" : true ,
20
+ "noFallthroughCasesInSwitch" : true ,
21
+
22
+ // Some stricter flags (disabled by default)
23
+ "noUnusedLocals" : false ,
24
+ "noUnusedParameters" : false ,
25
+ "noPropertyAccessFromIndexSignature" : false
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments