Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/purinx/next-sst-pg
This is a sample for easily building an app (infrastructure) using Next.js and PostgreSQL on AWS with SST.
https://github.com/purinx/next-sst-pg
aws nextjs postgresql sst
Last synced: 12 days ago
JSON representation
This is a sample for easily building an app (infrastructure) using Next.js and PostgreSQL on AWS with SST.
- Host: GitHub
- URL: https://github.com/purinx/next-sst-pg
- Owner: purinx
- Created: 2024-10-20T06:53:03.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-21T01:17:10.000Z (2 months ago)
- Last Synced: 2024-10-23T11:49:47.226Z (about 2 months ago)
- Topics: aws, nextjs, postgresql, sst
- Language: TypeScript
- Homepage:
- Size: 205 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SST PostgreSQL Sample
This is a sample for easily building a simple app (infrastructure) using Next.js and PostgreSQL on AWS with SST.
## Overview
- sst
- Next.js
- PostgreSQL
- Drizzle ORM## Requirements
- AWS
- https://sst.dev/docs/aws-accounts
- Node.js (npm)
- sst
- Automatically installed with `npx sst ...` command## Setup
```
npm i
sudo npx sst tunnel install
````npx sst tunnel install` is a script that installs the network interface needed to tunnel to an RDS within a VPC. Therefore, `sudo` is required.
### Migration
First, create a tunnel.
```
npx sst tunnel
```In another tab
```
npm run db generate
npm run db migrate
```## Start dev mode
```
npm run sst:dev
```You can view the output at http://localhost:3000.
Additionally, you can use Drizzle Studio at https://local.drizzle.studio.## Deploy
```
npx sst tunnel --stage production
```In another tab
```
sudo npx sst shell drizzle-kit migrate --stage production
npm run sst:deploy
```## See more
https://sst.dev/docs/start/aws/drizzle