Skip to content

Commit

Permalink
Merge pull request #30 from HarunaMahjong/main
Browse files Browse the repository at this point in the history
readme.md에 create-seia-app 소개, 명령어 설명 추가했습니다.
  • Loading branch information
abiriadev authored Jun 7, 2024
2 parents f641039 + a609e32 commit cb0498e
Showing 1 changed file with 36 additions and 17 deletions.
53 changes: 36 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

_Lightweight SSR framework for React Server Components_

[Getting started](#getting-started)
[Quickstart](#rocket-quickstart)
[Try demo](./examples/blue-archive-students)
[Documentation](https://seia.dev)
[Community](https://github.com/abiriadev/seia/discussions)
Expand All @@ -28,36 +28,55 @@ _Lightweight SSR framework for React Server Components_
- **TypeScript support**: Comes with type-safe API and hooks out of the box, but allows you to use JavaScript if you prefer.
- **Deploy anywhere**: Deploy your SSR server to Vercel, Netlify, Cloudflare Workers and anywhere [Hono](https://hono.dev) supports.

## :zap: Getting Started
## :rocket: Quickstart

Create a new empty React project or use your existing one. If you're unsure how to start, follow the [Vite's official template](https://vitejs.dev/guide/#scaffolding-your-first-vite-project).

Then, install Seia:
We provide the `create-seia-app` wizard to help you get your new project up and running quickly

```sh
$ npm install seia.js
$ npm create seia-app # yarn create seia-app or pnpm create seia-app
```

> [!TIP]
> You can use any package manager you prefer, such as `yarn` or `pnpm`.
> [!IMPORTANT]
> Seia currently requires `react` and `react-dom` as peer dependencies with the exact version `19.0.0-beta-26f2496093-20240514`.
> Once React 19 has a stable release, Seia will be updated to support the stable version.
After running the command, it will start to ask you a few questions. Choose the options that best suit your needs. Once you've made your selections, a new project will be created with the specified settings.

After installation, build your project with the following command:
Navigate into your newly created project directory and install the dependencies. After that, build your project using the following command:

```sh
$ npx seia build
$ npm run build # yarn build or pnpm build
```

This will generate a `dist` folder containing the server and client bundles. To start the SSR server, use:


```sh
$ npx seia start
$ npm start # yarn start or pnpm start
```

If everything is set up correctly, you should see the server running at http://localhost:5314.

## :zap: Migrate from Vite

If you already have a Vite project and want to migrate it to Seia, follow these steps.

First, install Seia as a dependency to your project:

```sh
$ npm install seia.js
```

> [!IMPORTANT]
> Seia currently requires `react` and `react-dom` as peer dependencies with the exact version `19.0.0-beta-26f2496093-20240514`.
> Once React 19 has a stable release, Seia will be updated to support the stable version.
After installing Seia, you can optionally add the following commands to your `package.json`'s `scripts` section for convenience.

```json
"scripts": {
"build": "seia build",
"start": "seia start"
}
```

If there are no errors, you should see the server running at http://localhost:5314.
Then, you can follow the same steps as outlined in the [Quickstart Guide](#rocket-quickstart) to build the project and start the SSR server.

## :question: What is Server Components?

Expand Down Expand Up @@ -106,7 +125,7 @@ const Counter = () => {
}
```

## :rocket: Try Demo
## :fire: Try Demo

You can try a simple demo of Seia with the [Blue Archive Students](./examples/blue-archive-students) sample. This project is a simple SSR application that fetches and displays the list of students of the [Blue Archive](https://bluearchive.nexon.com/home).

Expand Down

0 comments on commit cb0498e

Please sign in to comment.