Go to file
Ladd Hoffman 022c1808ca Add instructions to set up local web server 2023-07-11 21:04:09 -05:00
notes Initial commit: copied from science-publishing-dao/forum-network, commit 907b99bb65db0e4d5da5c93f74377e38c5cc8e1f 2023-07-10 12:36:31 -05:00
src Change "DGF Tests" to "DGF Prototype" 2023-07-11 21:02:40 -05:00
.eslintrc.js Initial commit: copied from science-publishing-dao/forum-network, commit 907b99bb65db0e4d5da5c93f74377e38c5cc8e1f 2023-07-10 12:36:31 -05:00
.gitignore Initial commit: copied from science-publishing-dao/forum-network, commit 907b99bb65db0e4d5da5c93f74377e38c5cc8e1f 2023-07-10 12:36:31 -05:00
.gitlab-ci.yml Add gitlab CI 2023-07-10 12:58:39 -05:00
README.md Add instructions to set up local web server 2023-07-11 21:04:09 -05:00
package-lock.json update package-lock.json 2023-07-10 12:58:52 -05:00
package.json Initial commit: copied from science-publishing-dao/forum-network, commit 907b99bb65db0e4d5da5c93f74377e38c5cc8e1f 2023-07-10 12:36:31 -05:00

README.md

Forum Logic

This project is a Javascript prototype for the DGF system.

It implements the core algorithm described in Craig Calcaterra (May 24, 2018) On-Chain Governance of Decentralized Autonomous Organizations.

This project is implemented as a static site, and so may be downloaded and browsed offline, or served via HTTP.

The main branch is served via GitLab Pages.

Development

For a more convenient local URL,

add forum.dev as an alias for 127.0.0.1 in your /etc/hosts file.

Install mkcert

Install nginx

Add the root CA for self-signed certificates

mkcert -install

Generate a certificate for forum.dev

mkcert forum.dev

Move the certificate to nginx config directory

sudo mkdir -p /etc/nginx/certs
sudo cp forum.dev{,-key}.pem /etc/nginx/certs/

Make your home directory readable to the webserver (hacky way):

chown a+r ~/

Configure nginx by adding a file /etc/nginx/sites-available/forum_dev, with content similar to the following:

server {
        listen 443 ssl;

        server_name forum.dev;
        ssl_certificate     /etc/nginx/certs/forum.dev.pem;
        ssl_certificate_key /etc/nginx/certs/forum.dev-key.pem;

        root /home/ladd/dgf/forum-logic/src/;
        index index.html;

        location / {
                try_files $uri $uri/ =404;
        }
}

Replace /home/ladd/dgf/forum-logic with the path to this repository on your filesystem.

Enable the site

sudo ln -s /etc/nginx/sites-available/forum_dev /etc/nginx/sites-enabled/

Now restart nginx and the site should be available at https://forum.dev.

Note that browsers may cache assets, so after modifying source code, you may need to refresh your browser while holding Shift to bypass the browser cache.

TODO

  • Move actor.js and action.js out of display/. To supporting?