Bot releases are visible (Hide)
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 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
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]
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
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
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
A couple of optimizations made to the StaticSite
:
sst deploy
and the site hasnβt changed, SST will skip uploading the files to S3 and invalidating CloudFront cache. This will save you a couple of minutes per deploy when you are just working on your backend.sst start
, SST will deploy a placeholder site, and will not re-deploy on changes. This is to ensure sst start
always start up quickly. And itβs assumed that you have your website running locally when you are working on it.Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang over 3 years ago
We made a minor change to how StaticSite
handle 404 pages for SPAs (ie. React, Vue, Angular). If you are using StaticSite
to deploy SPAs, make sure to configure errorPage
like this:
import { StaticSite, StaticSiteErrorOptions } from "@serverless-stack/resources";
new StaticSite(this, "ReactSite", {
path: "path/to/src",
+ errorPage: StaticSiteErrorOptions.REDIRECT_TO_INDEX_PAGE,
buildCommand: "npm run build",
buildOutput: "build",
});
Update using:
$ npm install --save --save-exact @serverless-stack/[email protected] @serverless-stack/[email protected]
Published by fwang over 3 years ago
Revert #476 App: add account property (@fwang)
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
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]