Skip to content

Commit

Permalink
Setup SST
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchernchong committed Oct 29, 2023
1 parent c3d6d17 commit eb54a82
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# open-next
.open-next/

# sst
.sst/
Binary file modified bun.lockb
Binary file not shown.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "sst bind next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
Expand All @@ -23,6 +23,9 @@
"postcss": "^8",
"prettier": "^3.0.3",
"tailwindcss": "^3",
"typescript": "^5"
"typescript": "^5",
"sst": "^2.32.2",
"aws-cdk-lib": "2.101.1",
"constructs": "10.2.69"
}
}
}
1 change: 1 addition & 0 deletions sst-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference path="./.sst/types/index.ts" />
25 changes: 25 additions & 0 deletions sst.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { SSTConfig } from "sst";
import { NextjsSite } from "sst/constructs";

export default {
config(_input) {
return {
name: "singapore-ev-trends",
region: "ap-southeast-1",
};
},
stacks(app) {
app.stack(function Site({ stack }) {
const site = new NextjsSite(stack, "site", {
customDomain: {
domainName: "singapore-ev-trends.ruchern.xyz",
hostedZone: "ruchern.xyz",
},
});

stack.addOutputs({
SiteUrl: site.url,
});
});
},
} satisfies SSTConfig;

0 comments on commit eb54a82

Please sign in to comment.