Bot releases are hidden (Show)
Published by fwang about 3 years ago
#786 Script: construct for running scripts during deployment (@fwang)
new Script(this, "Script", {
function: "src/script.main",
params: {
hello: "world",
tableName: table.tableName,
},
});
More examples here - https://docs.serverless-stack.com/constructs/Script#examples
#772 Prompt for default stage name (@thdxr)
On first run of the CLI, you will be prompted for a default stage name that is used when --stage
is not passed in. This is used to keep multiple developers' stacks separated and should be set to a unique value. The CLI will suggest a default stage name based on your AWS IAM username.
This value is stored in .sst
, and it should not be checked into source control. Add .sst
to your .gitignore
file.
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by thdxr about 3 years ago
import { RemovalPolicy } from "@aws-cdk/core";
export default function main(app: sst.App): void {
app.setDefaultRemovalPolicy(RemovalPolicy.DESTROY);
}
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by thdxr about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by thdxr about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
new AppSyncApi(stack, "Api", {
graphqlApi: {
schema: ["schemas/users.graphql", "schemas/posts.graphql"],
},
});
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
new sst.Function(this, "Fn", {
runtime: "dotnetcore3.1",
srcPath: "src/MyApp",
handler: "MyApp::MyApp.Api::ListNotes",
});
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by thdxr about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by thdxr about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
import { EventBus } from "@serverless-stack/resources";
new EventBus(this, "MyBus", {
rules: {
myRule: {
eventPattern: { source: ["aws.codebuild"] },
targets: ["src/target1.main", "src/target2.main"],
},
},
});
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
new Api(this, "Api", {
routes: {
"GET /notes" : "src/list.main",
"POST /notes" : "src/create.main",
"$default" : "src/default.main",
},
});
new Api(this, "Api", {
routes: {
"GET /": {
url: "http://domain.com",
},
},
});
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang about 3 years ago
Published by fwang over 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang over 3 years ago
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang over 3 years ago
new ReactStaticSite(this, "ReactSite", {
path: "path/to/react-app",
environment: {
REACT_APP_API_URL: api.url,
REACT_APP_USER_POOL_CLIENT: auth.cognitoUserPoolClient.userPoolClientId,
},
});
More examples here - https://docs.serverless-stack.com/constructs/ReactStaticSite
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]