mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
add: update README in solid example
This commit is contained in:
@@ -1,32 +1,59 @@
|
||||
# SolidStart
|
||||
# bknd starter: Solid Start
|
||||
A minimal example of a Solid Start project with bknd integration.
|
||||
|
||||
Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com);
|
||||
## Project Structure
|
||||
|
||||
## Creating a project
|
||||
Inside of your Solid Start project, you'll see the following folders and files:
|
||||
|
||||
```bash
|
||||
# create a new project in the current directory
|
||||
npm init solid@latest
|
||||
|
||||
# create a new project in my-app
|
||||
npm init solid@latest my-app
|
||||
```text
|
||||
.
|
||||
├── bknd.config.ts
|
||||
├── bun.lock
|
||||
├── package.json
|
||||
├── public
|
||||
│ ├── admin # generated by bknd and contains the admin UI
|
||||
│ ├── bknd.ico
|
||||
│ ├── bknd.svg
|
||||
│ ├── file.svg
|
||||
│ ├── globe.svg
|
||||
│ ├── solid.svg
|
||||
│ └── window.svg
|
||||
├── README.md # you're here
|
||||
├── src
|
||||
│ ├── app.css
|
||||
│ ├── app.tsx
|
||||
│ ├── components
|
||||
│ │ ├── Footer.tsx
|
||||
│ │ └── List.tsx
|
||||
│ ├── entry-client.tsx
|
||||
│ ├── entry-server.tsx
|
||||
│ ├── global.d.ts
|
||||
│ ├── lib
|
||||
│ │ └── bknd.ts # initializes bknd instance
|
||||
│ ├── middleware
|
||||
│ │ └── index.ts # mounts bknd middleware
|
||||
│ └── routes
|
||||
│ ├── [...404].tsx
|
||||
│ ├── index.tsx
|
||||
│ └── user.tsx
|
||||
├── tsconfig.json
|
||||
└── vite.config.ts
|
||||
```
|
||||
|
||||
## Developing
|
||||
Here is a quick overview about how to adjust the behavior of `bknd`:
|
||||
* Initialization of the `bknd` config with helper functions are located at `src/lib/bknd.ts`
|
||||
* Admin UI is rendered using `src/middleware/index.ts`
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
All commands are run from the root of the project, from a terminal:
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
```
|
||||
| Command | Action |
|
||||
|:--------------------------|:-------------------------------------------------|
|
||||
| `npm install` | Installs dependencies |
|
||||
| `npm run dev` | Starts local dev server at `localhost:3000` |
|
||||
| `npm run build` | Build your production site |
|
||||
|
||||
## Building
|
||||
## Want to learn more?
|
||||
|
||||
Solid apps are built with _presets_, which optimise your project for deployment to different environments.
|
||||
|
||||
By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`.
|
||||
|
||||
## This project was created with the [Solid CLI](https://github.com/solidjs-community/solid-cli)
|
||||
Feel free to check [our documentation](https://docs.bknd.io/integration/solid-start) or jump into our [Discord server](https://discord.gg/952SFk8Tb8).
|
||||
Reference in New Issue
Block a user