NGPixel
7c2b5dd4dd
|
1 year ago | |
---|---|---|
.devcontainer | 1 year ago | |
.github | 1 year ago | |
.vscode | 2 years ago | |
blocks | 1 year ago | |
dev | 1 year ago | |
server | 1 year ago | |
ux | 1 year ago | |
.editorconfig | 2 years ago | |
.eslintrc.yml | 2 years ago | |
.gitattributes | 5 years ago | |
.gitignore | 2 years ago | |
LICENSE | 8 years ago | |
README.md | 1 year ago | |
config.sample.yml | 1 year ago | |
localazy.json | 2 years ago |
README.md
🟥 ⚠️ ⚠️ 🟥
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!
🟥 ⚠️ ⚠️ 🟥
The current stable release (2.x) is available at https://js.wiki
- Using VS Code Dev Environment (recommended)
- Generic Setup
Using VS Code Dev Environment
Requirements
- VS Code
- Docker Desktop
- Windows-only: WSL 2 + WSL Integration enabled in Docker Desktop
Usage
- Clone the project.
- Open the project in VS Code.
- Make sure you have Dev Containers extension installed. (On Windows, you need the WSL VS Code extension as well.)
- 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).
- Once in container mode, make a copy of
config.sample.yml
and rename it toconfig.yml
. There's no need to edit the file, the default values are ok. - From the Command Palette, run the task "Create terminals":
- Launch the Command Palette (Ctrl+Shift+P or F1)
- Type
Run Task
and press Enter - Select the task "Create terminals" and press Enter
- Two terminals will launch in split-screen mode at the bottom of the screen. Server on the left and UX on the right.
- In the right-side terminal (UX), run the command:
npm run build
- In the left-side terminal (Server), run the command:
npm run start
- Open your browser to
http://localhost:3000
- Login using the default administrator user:
- Email:
admin@example.com
- Password:
12345678
- Email:
DO NOT report bugs. This build is VERY buggy and VERY incomplete. Absolutely NO support is provided either.
Server Development
From the left-side terminal (Server), run the command:
npm run 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.
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!
If you wish to modify any frontend content (under /ux
), you need to start the Quasar Dev Server in the right-side terminal (UX):
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.
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.
pgAdmin
A web version of pgAdmin (a PostgreSQL administration tool) is available at http://localhost:8000
. Use the login dev@js.wiki
/ 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:
- Hostname:
db
- Port:
5432
- Username:
postgres
- Password:
postgres
- Database:
postgres
Generic Setup
Requirements
- Node.js 18.x or later
- PostgreSQL 11 or later
Usage
- Clone the project
- Make a copy of
config.sample.yml
and rename it toconfig.yml
- Edit
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:
cd server npm install cd ../ux npm install npm run build cd ..
- Run this command to start the server:
node server
- In your browser, navigate to
http://localhost:3000
(or the IP/hostname of the server and the PORT you defined earlier.) - Login using the default administrator user:
- Email:
admin@example.com
- Password:
12345678
- Email:
DO NOT report bugs. This build is VERY buggy and VERY incomplete. Absolutely NO support is provided either.