Skip to content

Commit 4cd4827

Browse files
committed
feat: Redwood SDK example
1 parent dc1c016 commit 4cd4827

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+10862
-20
lines changed

cli/create-start-app/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ cli({
1212
appName: 'TanStack Start',
1313
forcedMode: 'file-router',
1414
forcedAddOns: ['start'],
15+
forcedHost: 'nitro',
1516
craCompatible: true,
1617
})

cli/create-tanstack-app/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ registerSolid()
1010
cli({
1111
name: 'create-tanstack-app',
1212
appName: 'TanStack',
13+
forcedHost: 'nitro',
1314
defaultTemplate: 'file-router',
1415
craCompatible: true,
1516
})

cli/create-tanstack/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ registerSolid()
1010
cli({
1111
name: 'create-tanstack',
1212
appName: 'TanStack',
13+
forcedHost: 'nitro',
1314
defaultTemplate: 'file-router',
1415
craCompatible: true,
1516
})

cli/create-tsrouter-app/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ registerSolid()
1010
cli({
1111
name: 'create-tsrouter-app',
1212
appName: 'TanStack',
13+
forcedHost: 'nitro',
1314
craCompatible: true,
1415
})

cli/ts-create-start/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ registerSolid()
99

1010
cli({
1111
name: '@tanstack/create-start',
12+
forcedHost: 'nitro',
1213
appName: 'TanStack Start',
1314
forcedMode: 'file-router',
1415
forcedAddOns: ['start'],
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Setting up Neon
2+
3+
When running the `dev` command, the `@neondatabase/vite-plugin-postgres` will identify there is not a database setup. It will then create and seed a claimable database.
4+
5+
It is the same process as [Neon Launchpad](https://neon.new).
6+
7+
> [!IMPORTANT]
8+
> Claimable databases expire in 72 hours.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These will be automatically created by Neon Launchpad (https://neon.new).
2+
# You will also need to
3+
VITE_DATABASE_URL=
4+
VITE_DATABASE_URL_POOLER=
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-- Schema for a simple to-do list
2+
CREATE TABLE IF NOT EXISTS todos (
3+
id SERIAL PRIMARY KEY,
4+
title VARCHAR(255) NOT NULL,
5+
description TEXT,
6+
is_completed BOOLEAN DEFAULT FALSE,
7+
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
8+
);
9+
10+
-- Initial data for the to-do list
11+
INSERT INTO todos (title, description, is_completed) VALUES
12+
('Buy groceries', 'Milk, Bread, Eggs, and Butter', FALSE),
13+
('Read a book', 'Finish reading "The Great Gatsby"', FALSE),
14+
('Workout', 'Go for a 30-minute run', FALSE);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import postgresPlugin from '@neondatabase/vite-plugin-postgres'
2+
3+
export default postgresPlugin({
4+
seed: {
5+
type: 'sql-script',
6+
path: 'db/init.sql',
7+
},
8+
referrer: 'create-tanstack',
9+
dotEnvKey: 'VITE_DATABASE_URL',
10+
})
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)