Wiki.js | A modern and powerful wiki app built on Node.js
![]() |
2 年之前 | |
---|---|---|
.devcontainer | 2 年之前 | |
.github | 3 年之前 | |
.vscode | 3 年之前 | |
client | 2 年之前 | |
dev | 2 年之前 | |
server | 2 年之前 | |
ux | 2 年之前 | |
.babelrc | 5 年之前 | |
.editorconfig | 3 年之前 | |
.eslintignore | 7 年之前 | |
.eslintrc.yml | 2 年之前 | |
.gitattributes | 5 年之前 | |
.gitignore | 2 年之前 | |
.npmrc | 7 年之前 | |
LICENSE | 8 年之前 | |
README.md | 2 年之前 | |
SECURITY.md | 3 年之前 | |
config.sample.yml | 2 年之前 | |
docker-compose.yml | 2 年之前 | |
package.json | 2 年之前 | |
yarn.lock | 2 年之前 |
:red_square: :warning: :warning: :red_square:
THIS IS A VERY BUGGY, INCOMPLETE AND NON-SECURE DEVELOPMENT BRANCH!
USE AT YOUR OWN RISK! THERE'S NO UPGRADE PATH FROM THIS BUILD AND NO SUPPORT IS PROVIDED!
:red_square: :warning: :warning: :red_square:
The current stable release (2.x) is available at https://js.wiki
config.sample.yml
and rename it to config.yml
config.yml
and fill in the database details. You need an empty PostgreSQL database.Run the following commands to install dependencies and generate the client assets:
yarn
yarn legacy:build
cd ux
yarn
yarn build
cd ..
Run this command to start the server:
node server
In your browser, navigate to http://localhost:5000
(or the IP/hostname of the server and the PORT you defined earlier.)
Login using the default administrator user:
admin@example.com
12345678
DO NOT report bugs. This build is VERY buggy and VERY incomplete. Absolutely NO support is provided either.
config.sample.yml
and rename it to config.yml
. There's no need to edit the file, the default values are ok.In the left-side terminal (Server), run the command:
yarn legacy:build
In the right-side terminal (UX), run the command:
yarn build
Back in the left-side terminal (Server), run the command:
yarn dev
Open your browser to http://localhost:5000
Login using the default administrator user:
admin@example.com
12345678
DO NOT report bugs. This build is VERY buggy and VERY incomplete. Absolutely NO support is provided either.
From the left-side terminal (Server), run the command:
yarn dev
This will launch the server and automatically restart upon modification of any server files.
Only precompiled client assets are served in this mode. See the sections below on how to modify the frontend and run in SPA (Single Page Application) mode.
Make sure you are running
yarn dev
in the left-side terminal (Server) 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):
yarn dev
You can then access the site at http://localhost:5001
. Notice the port being 5001
rather than 5000
. 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 5000
, which is why both must be running at the same time.
Note that not all sections/features are available from this mode, notably the page editing features which still relies on the old client code (Vuetify/Vue 2). For example, trying to edit a page will simply not work. You must use the normal mode (port 5000) to edit pages as it relies on legacy client code. As more features gets ported / developed for Vue 3, they will become available in the SPA mode.
Any change you make to the frontend will not be reflected on port 5000 until you run the command yarn build
in the right-side terminal.
Client code from Wiki.js 2.x is located under /client
. Some sections still rely on this legacy code (notably the page editing features). Code is gradually being removed from this location and replaced with newer code in /ux
.
In the unlikely event that you need to modify legacy code and regenerate the old client files, you can do so by running in this command in the left-side terminal (Server):
yarn legacy:build
Then run yarn dev
to start the server again.
A web version of pgAdmin (a PostgreSQL administration tool) is available at http://localhost:8000
. Use the login dev
/ 123123
to login.
The server dev should already be available under Servers. If that's not the case, add a new one with the following settings:
db
5432
postgres
postgres
postgres