Skip to content

docs: add info about create-elysiajs #493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 81 additions & 2 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,91 @@ powershell -c "irm bun.sh/install.ps1 | iex"

<Tab
id="quickstart"
:names="['Auto Installation', 'Manual Installation']"
:tabs="['auto', 'manual']"
:names="['Auto Installation', 'Auto installation (minimal)', 'Manual Installation']"
:tabs="['auto', 'auto-minimal', 'manual']"
>

<template v-slot:auto>

We recommend starting a new Elysia server using `bun create elysiajs`, which sets up everything automatically.

```bash
bun create elysiajs app
```

And there you can set up your project directly from the CLI! It helps to relieve the pain of starting a project and prepares it for your needs.

#### Supported environment

- Linters
- - [Biome](https://biomejs.dev/)
- - [ESLint](https://eslint.org/) with [@antfu/eslint-config](https://eslint-config.antfu.me/rules)
- ORM/Query builders
- - [Prisma](https://www.prisma.io/)
- - [Drizzle](https://orm.drizzle.team/)
- Plugins
- - [CORS](https://elysiajs.com/plugins/cors.html)
- - [Swagger](https://elysiajs.com/plugins/swagger.html)
- - [JWT](https://elysiajs.com/plugins/jwt.html)
- - [Autoload](https://github.com/kravetsone/elysia-autoload)
- - [Oauth 2.0](https://github.com/kravetsone/elysia-oauth2)
- - [HTML/JSX](https://elysiajs.com/plugins/html.html)
- - [Logger](https://github.com/bogeychan/elysia-logger)
- - [Static](https://elysiajs.com/plugins/static.html)
- - [Bearer](https://elysiajs.com/plugins/bearer.html)
- - [Server Timing](https://elysiajs.com/plugins/server-timing.html)
- Others
- - [Dockerfile](https://www.docker.com/) + [docker-compose.yml](https://docs.docker.com/compose/)
- - [Jobify](https://github.com/kravetsone/jobify) ([Bullmq](https://docs.bullmq.io/) wrapper)
- - [Posthog](https://posthog.com/docs/libraries/node)
- - [Verrou](https://github.com/kravetsone/verrou) (Locks)
- - [Env-var](https://github.com/wobsoriano/env-var) (Environment variables)
- - [.vscode](https://code.visualstudio.com/) (VSCode settings)
- - [Husky](https://typicode.github.io/husky/) (Git hooks)
- And more soon...

```bash
$ bun create elysiajs test

√ Select linters/formatters: · Biome
√ Select ORM/Query Builder: · Drizzle
√ Select DataBase for Drizzle: · PostgreSQL
√ Select driver for PostgreSQL: · Postgres.JS
√ Select Elysia plugins: (Space to select, Enter to continue) · CORS, Swagger, JWT, Autoload, Oauth 2.0, Logger, HTML/JSX, Static, Bearer, Server Timing
√ Select others tools: (Space to select, Enter to continue) · Posthog, Jobify
√ Create an empty Git repository? · no / yes
√ Do you want to use Locks to prevent race conditions? · no / yes
√ Create Dockerfile + docker.compose.yml? · no / yes
√ Create .vscode folder with VSCode extensions recommendations and settings? · no / yes
✔ Template generation is complete!
✔ git init
✔ bun install
✔ bunx @biomejs/biome init
✔ bun lint:fix
```

Once done, you should see the folder name `app` in your directory.

```bash
cd app
```

Start a development server by:

```bash
bun dev
```

::: tip
You can choose to create a `docker-compose.yml` file and run an postgres container and start developing in an instant!
:::



</template>

<template v-slot:auto-minimal>

We recommend starting a new Elysia server using `bun create elysia`, which sets up everything automatically.

```bash
Expand Down