You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then change into that directory, yarn install, and start the development server:
31
33
32
34
```
33
-
cd my-redwood-project
35
+
cd my-cedar-project
34
36
yarn install
35
-
yarn redwood dev
37
+
yarn cedarjs dev
36
38
```
37
39
38
40
Your browser should automatically open to [http://localhost:8910](http://localhost:8910) where you'll see the Welcome Page, which links out to many great resources:
Congratulations on running your first Redwood CLI command!
46
+
Congratulations on running your first Cedar CLI command!
45
47
From dev to deploy, the CLI is with you the whole way.
46
48
And there's quite a few commands at your disposal:
47
49
48
50
```
49
-
yarn redwood --help
51
+
yarn cedarjs --help
50
52
```
51
53
52
54
For all the details, see the [CLI reference](cli-commands.md).
53
55
54
56
### GitPod
55
57
56
-
The fastest way to start a new Redwood project is to use GitPod ([additional documentation for working with GitPod](./how-to/using-gitpod)).
58
+
The fastest way to start a new Cedar project is to use GitPod ([additional documentation for working with GitPod](./how-to/using-gitpod)).
57
59
58
60
[](https://gitpod.io/#https://github.com/redwoodjs/starter)
59
61
60
62
## Prisma and the database
61
63
62
-
Redwood wouldn't be a full-stack framework without a database. It all starts with the schema. Open the `schema.prisma` file in `api/db` and replace the `UserExample` model with the following `Post` model:
64
+
CedarJS wouldn't be a full-stack framework without a database. It all starts
65
+
with the schema. Open the `schema.prisma` file in `api/db` and replace the
66
+
`UserExample` model with the following `Post` model:
63
67
64
68
```js title="api/db/schema.prisma"
65
69
model Post {
@@ -70,10 +74,14 @@ model Post {
70
74
}
71
75
```
72
76
73
-
Redwood uses [Prisma](https://www.prisma.io/), a next-gen Node.js and TypeScript ORM, to talk to the database. Prisma's schema offers a declarative way of defining your app's data models. And Prisma [Migrate](https://www.prisma.io/migrate) uses that schema to make database migrations hassle-free:
77
+
CedarJS uses [Prisma](https://www.prisma.io/), a next-gen Node.js and TypeScript
78
+
ORM, to talk to the database. Prisma's schema offers a declarative way of
79
+
defining your app's data models. And Prisma
80
+
[Migrate](https://www.prisma.io/migrate) uses that schema to make database
81
+
migrations hassle-free:
74
82
75
83
```
76
-
yarn rw prisma migrate dev
84
+
yarn cedarjs prisma migrate dev
77
85
78
86
# ...
79
87
@@ -91,67 +99,68 @@ You'll be prompted for the name of your migration. `create posts` will do.
91
99
Now let's generate everything we need to perform all the CRUD (Create, Retrieve, Update, Delete) actions on our `Post` model:
92
100
93
101
```
94
-
yarn redwood generate scaffold post
102
+
yarn cedarjs generate scaffold post
95
103
```
96
104
97
105
Navigate to [http://localhost:8910/posts/new](http://localhost:8910/posts/new), fill in the title and body, and click "Save":
98
106
99
107
<imgsrc="https://user-images.githubusercontent.com/300/73028004-72262c00-3de9-11ea-8924-66d1cc1fceb6.png"alt="Create a new post" />
100
108
101
-
Did we just create a post in the database? Yup! With `yarn rw generate scaffold <model>`, Redwood created all the pages, components, and services necessary to perform all CRUD actions on our posts table.
109
+
Did we just create a post in the database? Yup! With `yarn cedarjs generate scaffold <model>`, Cedar created all the pages, components, and services necessary to perform all CRUD actions on our posts table.
102
110
103
111
## Frontend first with Storybook
104
112
105
113
Don't know what your data models look like?
106
-
That's more than ok—Redwood integrates Storybook so that you can work on design without worrying about data.
114
+
That's more than ok — Cedar integrates Storybook so that you can work on design without worrying about data.
107
115
Mockup, build, and verify your React components, even in complete isolation from the backend:
108
116
109
117
```
110
-
yarn rw storybook
118
+
yarn cedarjs storybook
111
119
```
112
120
113
121
Seeing "Couldn't find any stories"?
114
122
That's because you need a `*.stories.{tsx,jsx}` file.
115
-
The Redwood CLI makes getting one easy enough—try generating a [Cell](./cells), Redwood's data-fetching abstraction:
123
+
The CedarJS CLI makes getting one easy enough — try generating a [Cell](./cells), CedarJS's data-fetching abstraction:
116
124
117
125
```
118
-
yarn rw generate cell examplePosts
126
+
yarn cedarjs generate cell examplePosts
119
127
```
120
128
121
129
The Storybook server should hot reload and now you'll have four stories to work with.
122
130
They'll probably look a little bland since there's no styling.
123
-
See if the Redwood CLI's `setup ui` command has your favorite styling library:
131
+
See if the CedarJS CLI's `setup ui` command has your favorite styling library:
124
132
125
133
```
126
-
yarn rw setup ui --help
134
+
yarn cedarjs setup ui --help
127
135
```
128
136
129
-
## Testing with Jest
137
+
## Testing with Vitest
130
138
131
139
It'd be hard to scale from side project to startup without a few tests.
132
-
Redwood fully integrates Jest with both the front- and back-ends, and makes it easy to keep your whole app covered by generating test files with all your components and services:
140
+
Cedar fully integrates Vitest with both the front- and back-ends, and makes it easy to keep your whole app covered by generating test files with all your components and services:
133
141
134
142
```
135
-
yarn rw test
143
+
yarn cedarjs test
136
144
```
137
145
138
-
To make the integration even more seamless, Redwood augments Jest with database [scenarios](testing.md#scenarios) and [GraphQL mocking](testing.md#mocking-graphql-calls).
146
+
To make the integration even more seamless, CedarJS augments Vitest with database [scenarios](testing.md#scenarios) and [GraphQL mocking](testing.md#mocking-graphql-calls).
139
147
140
148
## Ship it
141
149
142
-
Redwood is designed for both serverless deploy targets like Netlify and Vercel and serverful deploy targets like Render and AWS:
150
+
CedarJS is designed for both serverless deploy targets like Netlify and Vercel and serverful deploy targets like Render and AWS:
143
151
144
152
```
145
-
yarn rw setup deploy --help
153
+
yarn cedarjs setup deploy --help
146
154
```
147
155
148
156
Don't go live without auth!
149
-
Lock down your app with Redwood's built-in, database-backed authentication system ([dbAuth](authentication.md#self-hosted-auth-installation-and-setup)), or integrate with nearly a dozen third-party auth providers:
157
+
Lock down your app with CedarJS's built-in, database-backed authentication system ([dbAuth](authentication.md#self-hosted-auth-installation-and-setup)), or integrate with
158
+
the most popular third-party auth providers:
150
159
151
160
```
152
-
yarn rw setup auth --help
161
+
yarn cedarjs setup auth --help
153
162
```
154
163
155
164
## Next Steps
156
165
157
-
The best way to learn Redwood is by going through the comprehensive [tutorial](tutorial/foreword.md) and joining the community (via the [Discourse forum](https://community.redwoodjs.com) or the [Discord server](https://discord.gg/redwoodjs)).
166
+
The best way to learn CedarJS is by going through the comprehensive [tutorial](tutorial/foreword.md) and joining the community on our [Discord server](https://cedarjs.com/discord)).
Then change into that directory, yarn install, and start the development server:
31
33
32
34
```
33
-
cd my-redwood-project
35
+
cd my-cedar-project
34
36
yarn install
35
-
yarn redwood dev
37
+
yarn cedarjs dev
36
38
```
37
39
38
40
Your browser should automatically open to [http://localhost:8910](http://localhost:8910) where you'll see the Welcome Page, which links out to many great resources:
Congratulations on running your first Redwood CLI command!
46
+
Congratulations on running your first Cedar CLI command!
45
47
From dev to deploy, the CLI is with you the whole way.
46
48
And there's quite a few commands at your disposal:
47
49
48
50
```
49
-
yarn redwood --help
51
+
yarn cedarjs --help
50
52
```
51
53
52
54
For all the details, see the [CLI reference](cli-commands.md).
53
55
54
56
### GitPod
55
57
56
-
The fastest way to start a new Redwood project is to use GitPod ([additional documentation for working with GitPod](./how-to/using-gitpod)).
58
+
The fastest way to start a new Cedar project is to use GitPod ([additional documentation for working with GitPod](./how-to/using-gitpod)).
57
59
58
60
[](https://gitpod.io/#https://github.com/redwoodjs/starter)
59
61
60
62
## Prisma and the database
61
63
62
-
Redwood wouldn't be a full-stack framework without a database. It all starts with the schema. Open the `schema.prisma` file in `api/db` and replace the `UserExample` model with the following `Post` model:
64
+
CedarJS wouldn't be a full-stack framework without a database. It all starts
65
+
with the schema. Open the `schema.prisma` file in `api/db` and replace the
66
+
`UserExample` model with the following `Post` model:
63
67
64
68
```js title="api/db/schema.prisma"
65
69
model Post {
@@ -70,10 +74,14 @@ model Post {
70
74
}
71
75
```
72
76
73
-
Redwood uses [Prisma](https://www.prisma.io/), a next-gen Node.js and TypeScript ORM, to talk to the database. Prisma's schema offers a declarative way of defining your app's data models. And Prisma [Migrate](https://www.prisma.io/migrate) uses that schema to make database migrations hassle-free:
77
+
CedarJS uses [Prisma](https://www.prisma.io/), a next-gen Node.js and TypeScript
78
+
ORM, to talk to the database. Prisma's schema offers a declarative way of
79
+
defining your app's data models. And Prisma
80
+
[Migrate](https://www.prisma.io/migrate) uses that schema to make database
81
+
migrations hassle-free:
74
82
75
83
```
76
-
yarn rw prisma migrate dev
84
+
yarn cedarjs prisma migrate dev
77
85
78
86
# ...
79
87
@@ -91,67 +99,68 @@ You'll be prompted for the name of your migration. `create posts` will do.
91
99
Now let's generate everything we need to perform all the CRUD (Create, Retrieve, Update, Delete) actions on our `Post` model:
92
100
93
101
```
94
-
yarn redwood generate scaffold post
102
+
yarn cedarjs generate scaffold post
95
103
```
96
104
97
105
Navigate to [http://localhost:8910/posts/new](http://localhost:8910/posts/new), fill in the title and body, and click "Save":
98
106
99
107
<imgsrc="https://user-images.githubusercontent.com/300/73028004-72262c00-3de9-11ea-8924-66d1cc1fceb6.png"alt="Create a new post" />
100
108
101
-
Did we just create a post in the database? Yup! With `yarn rw generate scaffold <model>`, Redwood created all the pages, components, and services necessary to perform all CRUD actions on our posts table.
109
+
Did we just create a post in the database? Yup! With `yarn cedarjs generate scaffold <model>`, Cedar created all the pages, components, and services necessary to perform all CRUD actions on our posts table.
102
110
103
111
## Frontend first with Storybook
104
112
105
113
Don't know what your data models look like?
106
-
That's more than ok—Redwood integrates Storybook so that you can work on design without worrying about data.
114
+
That's more than ok — Cedar integrates Storybook so that you can work on design without worrying about data.
107
115
Mockup, build, and verify your React components, even in complete isolation from the backend:
108
116
109
117
```
110
-
yarn rw storybook
118
+
yarn cedarjs storybook
111
119
```
112
120
113
121
Seeing "Couldn't find any stories"?
114
122
That's because you need a `*.stories.{tsx,jsx}` file.
115
-
The Redwood CLI makes getting one easy enough—try generating a [Cell](./cells), Redwood's data-fetching abstraction:
123
+
The CedarJS CLI makes getting one easy enough — try generating a [Cell](./cells), CedarJS's data-fetching abstraction:
116
124
117
125
```
118
-
yarn rw generate cell examplePosts
126
+
yarn cedarjs generate cell examplePosts
119
127
```
120
128
121
129
The Storybook server should hot reload and now you'll have four stories to work with.
122
130
They'll probably look a little bland since there's no styling.
123
-
See if the Redwood CLI's `setup ui` command has your favorite styling library:
131
+
See if the CedarJS CLI's `setup ui` command has your favorite styling library:
124
132
125
133
```
126
-
yarn rw setup ui --help
134
+
yarn cedarjs setup ui --help
127
135
```
128
136
129
-
## Testing with Jest
137
+
## Testing with Vitest
130
138
131
139
It'd be hard to scale from side project to startup without a few tests.
132
-
Redwood fully integrates Jest with both the front- and back-ends, and makes it easy to keep your whole app covered by generating test files with all your components and services:
140
+
Cedar fully integrates Vitest with both the front- and back-ends, and makes it easy to keep your whole app covered by generating test files with all your components and services:
133
141
134
142
```
135
-
yarn rw test
143
+
yarn cedarjs test
136
144
```
137
145
138
-
To make the integration even more seamless, Redwood augments Jest with database [scenarios](testing.md#scenarios) and [GraphQL mocking](testing.md#mocking-graphql-calls).
146
+
To make the integration even more seamless, CedarJS augments Vitest with database [scenarios](testing.md#scenarios) and [GraphQL mocking](testing.md#mocking-graphql-calls).
139
147
140
148
## Ship it
141
149
142
-
Redwood is designed for both serverless deploy targets like Netlify and Vercel and serverful deploy targets like Render and AWS:
150
+
CedarJS is designed for both serverless deploy targets like Netlify and Vercel and serverful deploy targets like Render and AWS:
143
151
144
152
```
145
-
yarn rw setup deploy --help
153
+
yarn cedarjs setup deploy --help
146
154
```
147
155
148
156
Don't go live without auth!
149
-
Lock down your app with Redwood's built-in, database-backed authentication system ([dbAuth](authentication.md#self-hosted-auth-installation-and-setup)), or integrate with nearly a dozen third-party auth providers:
157
+
Lock down your app with CedarJS's built-in, database-backed authentication system ([dbAuth](authentication.md#self-hosted-auth-installation-and-setup)), or integrate with
158
+
the most popular third-party auth providers:
150
159
151
160
```
152
-
yarn rw setup auth --help
161
+
yarn cedarjs setup auth --help
153
162
```
154
163
155
164
## Next Steps
156
165
157
-
The best way to learn Redwood is by going through the comprehensive [tutorial](tutorial/foreword.md) and joining the community (via the [Discourse forum](https://community.redwoodjs.com) or the [Discord server](https://discord.gg/redwoodjs)).
166
+
The best way to learn CedarJS is by going through the comprehensive [tutorial](tutorial/foreword.md) and joining the community on our [Discord server](https://cedarjs.com/discord)).
0 commit comments