docs: update README

pull/7976/head
NGPixel 6 months ago
parent b3c84fffbb
commit 2e9ef68a4d
No known key found for this signature in database

@ -9,17 +9,13 @@
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-green.svg?style=flat&logo=javascript&logoColor=white)](http://standardjs.com/) [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-green.svg?style=flat&logo=javascript&logoColor=white)](http://standardjs.com/)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/ngpixel?logo=github&color=ea4aaa)](https://github.com/users/NGPixel/sponsorship) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ngpixel?logo=github&color=ea4aaa)](https://github.com/users/NGPixel/sponsorship)
[![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/wikijs?label=backers&color=218bff&logo=opencollective&logoColor=white)](https://opencollective.com/wikijs) [![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/wikijs?label=backers&color=218bff&logo=opencollective&logoColor=white)](https://opencollective.com/wikijs)
[![Chat on Slack](https://img.shields.io/badge/slack-requarks-CC2B5E.svg?style=flat&logo=slack)](https://wiki.requarks.io/slack)
[![Twitter Follow](https://img.shields.io/badge/follow-%40requarks-blue.svg?style=flat&logo=twitter)](https://twitter.com/requarks)
[![Reddit](https://img.shields.io/badge/reddit-%2Fr%2Fwikijs-orange?logo=reddit&logoColor=white)](https://www.reddit.com/r/wikijs/)
[![Subscribe to Newsletter](https://img.shields.io/badge/newsletter-subscribe-yellow.svg?style=flat&logo=mailchimp)](https://blog.js.wiki/subscribe)
##### Next Generation Open Source Wiki ##### Next Generation Open Source Wiki
</div> </div>
- **[Official Website](https://next.js.wiki/)** - **[Official Website](https://beta.js.wiki)**
- **[Documentation](https://next.js.wiki/docs/)** - **[Documentation](https://beta.js.wiki/docs)**
:red_square: :warning: :warning: :red_square: :red_square: :warning: :warning: :red_square:
**THIS IS A VERY BUGGY, INCOMPLETE AND NON-SECURE DEVELOPMENT BRANCH!** **THIS IS A VERY BUGGY, INCOMPLETE AND NON-SECURE DEVELOPMENT BRANCH!**
@ -31,13 +27,13 @@ The current stable release (2.x) is available at https://js.wiki
--- ---
- [Using VS Code Dev Environment](#using-vs-code-dev-environment) *(recommended)* - [Using VS Code Dev Environment](#using-vs-code-dev-environment) *(recommended)*
- [Requirements](#requirements-1) - [Requirements](#requirements)
- [Usage](#usage) - [Usage](#usage)
- [Server Development](#server-development) - [Backend Development](#backend-development)
- [Frontend Development (Quasar/Vue 3)](#frontend-development-quasarvue-3) - [Frontend Development](#frontend-development)
- [pgAdmin](#pgadmin) - [pgAdmin](#pgadmin)
- [Generic Setup](#generic-setup) - [Generic Setup](#generic-setup)
- [Requirements](#requirements) - [Requirements](#requirements-1)
- [Usage](#usage-1) - [Usage](#usage-1)
## Using VS Code Dev Environment ## Using VS Code Dev Environment
@ -55,18 +51,17 @@ The current stable release (2.x) is available at https://js.wiki
1. Make sure you have **Dev Containers** extension installed. (On Windows, you need the **WSL** VS Code extension as well.) 1. Make sure you have **Dev Containers** extension installed. (On Windows, you need the **WSL** VS Code extension as well.)
1. Reopen the project in container (from the popup in the lower-right corner of the screen when opening the project, or via the Command Palette (Ctrl+Shift+P *or* F1) afterwards). 1. Reopen the project in container (from the popup in the lower-right corner of the screen when opening the project, or via the Command Palette (Ctrl+Shift+P *or* F1) afterwards).
1. Once in container mode, make a copy of `config.sample.yml` and rename it to `config.yml`. There's no need to edit the file, the default values are ok. 1. Once in container mode, make a copy of `config.sample.yml` and rename it to `config.yml`. There's no need to edit the file, the default values are ok.
1. From the Command Palette, run the task "Create terminals": 1. Two terminals should automatically launch in the lower part of the screen. If this isn't the case, from the Command Palette, run the task "Create terminals":
- Launch the Command Palette (Ctrl+Shift+P *or* F1) - Launch the Command Palette (Ctrl+Shift+P *or* F1)
- Type `Run Task` and press <kbd>Enter</kbd> - Type `Run Task` and press <kbd>Enter</kbd>
- Select the task "Create terminals" and press Enter - Select the task "Create terminals" and press Enter
1. Two terminals will launch in split-screen mode at the bottom of the screen. **Server** on the left and **UX** on the right. 1. In the right-side terminal (Frontend), run the command:
1. In the right-side terminal (UX), run the command:
```sh ```sh
pnpm build npm run build
``` ```
1. In the left-side terminal (Server), run the command: 1. In the left-side terminal (Backend), run the command:
```sh ```sh
pnpm start npm run start
``` ```
1. Open your browser to `http://localhost:3000` 1. Open your browser to `http://localhost:3000`
1. Login using the default administrator user: 1. Login using the default administrator user:
@ -75,12 +70,12 @@ The current stable release (2.x) is available at https://js.wiki
> **DO NOT** report bugs. This build is **VERY** buggy and **VERY** incomplete. Absolutely **NO** support is provided either. > **DO NOT** report bugs. This build is **VERY** buggy and **VERY** incomplete. Absolutely **NO** support is provided either.
### Server Development ### Backend Development
From the left-side terminal (Server), run the command: From the left-side terminal (Backend), run the command:
```sh ```sh
pnpm dev npm run dev
``` ```
This will launch the server and automatically restart upon modification of any server files. This will launch the server and automatically restart upon modification of any server files.
@ -89,17 +84,17 @@ Only precompiled client assets are served in this mode. See the sections below o
### Frontend Development ### Frontend Development
> Make sure you are running `npm run dev` in the left-side terminal (Server) first! Requests still need to be forwarded to the server, even in SPA mode! > Make sure you are running `npm run dev` in the left-side terminal (Backend) first! Requests still need to be forwarded to the server, even in SPA mode!
If you wish to modify any frontend content (under `/ux`), you need to start the Quasar Dev Server in the right-side terminal (UX): If you wish to modify any frontend content (under `/frontend`), you need to start the Quasar Dev Server in the right-side terminal (Frontend):
```sh ```sh
pnpm dev npm run dev
``` ```
You can then access the site at `http://localhost:3001`. Notice the port being `3001` rather than `3000`. The app runs in a SPA (single-page application) mode and automatically hot-reload any modified component. Any requests made to the `/graphql` endpoint are automatically forwarded to the server running on port `3000`, which is why both must be running at the same time. You can then access the site at `http://localhost:3001`. Notice the port being `3001` rather than `3000`. The app runs in a SPA (single-page application) mode and automatically hot-reload any modified component. Any requests made to the `/_api` endpoint are automatically forwarded to the server running on port `3000`, which is why both must be running at the same time.
Any change you make to the frontend will not be reflected on port 3000 until you run the command `yarn build` in the right-side terminal. Any change you make to the frontend will not be reflected on port 3000 until you run the command `npm run build` in the right-side terminal.
### pgAdmin ### pgAdmin
@ -119,7 +114,6 @@ The server **dev** should already be available under **Servers**. If that's not
- PostgreSQL **16** or later - PostgreSQL **16** or later
- Node.js **24.x** or later - Node.js **24.x** or later
- [pnpm](https://pnpm.io/installation#using-corepack)
### Usage ### Usage
@ -128,14 +122,14 @@ The server **dev** should already be available under **Servers**. If that's not
1. Edit `config.yml` and fill in the database details. **You need an empty PostgreSQL database.** 1. Edit `config.yml` and fill in the database details. **You need an empty PostgreSQL database.**
1. Run the following commands to install dependencies and generate the client assets: 1. Run the following commands to install dependencies and generate the client assets:
```sh ```sh
cd server cd backend
pnpm install npm install
cd ../ux cd ../ux
pnpm install npm install
pnpm build npm run build
cd ../blocks cd ../blocks
pnpm install npm install
pnpm build npm run build
cd .. cd ..
``` ```
1. Run this command to start the server: 1. Run this command to start the server:

Loading…
Cancel
Save