A Place for Civilised Knowledge
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Inderjit Gill d1c9cd6b95 bug fixes and Makefile 'run' target added 7 months ago
core unnumbered sidenote 8 months ago
misc assets for generating icons 7 months ago
server bug fixes and Makefile 'run' target added 7 months ago
user-content Image Markup 9 months ago
wasm renamed public wasm functions 8 months ago
www bug fixes and Makefile 'run' target added 7 months ago
.env.example bug fixes and Makefile 'run' target added 7 months ago
.gitignore bug fixes and Makefile 'run' target added 7 months ago
COPYING LICENSE.md renamed to COPYING 8 months ago
Makefile bug fixes and Makefile 'run' target added 7 months ago
README.md dist build minifies clientside code 11 months ago
markup-syntax.txt misc. 8 months ago

README.md

Civil

A knowledge management system for the next 30 years

Server

rename server/.env.example to server/.env and update it for your environment

$ cd server && cargo run

Client

$ make wasm

Deploying

$ make upload

(Dev) loading a test database

  • copy a backup from the server (e.g. civil_20201116.psql)

  • create a local database: $ createdb civil_20201116

  • load in the backup: psql civil_20201116 < civil_20201116.psql

  • update the .env variables

  • restart the server, login, may need an additional refresh to display the db name

(Dev) generating the library js files

preact.js: package.json script in preact project: rename all mangle.json files to _mangle.json

"isg": "microbundle -i src/index.js -o dist/isg-bundle.js --no-pkg-main --no-compress -f es", then rename dist/isg-bundle.module.js to preact.js

hooks.js: go into the preact project's hooks/src directory, copy index.js to hooks.js updating the import declaration.

htm: manually copied build.mjs from the project and made changes

preact-router: manually copied over and made changes

Requirements

A modern (for c.2020) web-browser
PostgreSQL
Rust
Make
(Optional) Minify (https://github.com/tdewolff/minify)

install minify: $ sudo apt install minify if the minify binary is not installed on the build system then the unminified assets will be used