Skip to content

Commit

Permalink
Add a simple 'developers' page and a link from the README (#7)
Browse files Browse the repository at this point in the history
* Add a simple 'developers' page and a link from the README

* Fix markdown relative link syntax

* Developers page: move user-space install instruction into the build phase
  • Loading branch information
lmanul committed Sep 16, 2020
1 parent 6405df2 commit 91a76bf
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -44,4 +44,6 @@ The Flask default port 5000 can be changed with the `--ports` option.

**:warning: net viel is meant for *local* use only. Do *not* expose this to the Internet as-is. Bad things will happen! :warning:**

## Development

To run net viel locally and make changes to the code, follow intructions on [this page](docs/developers.md).
46 changes: 46 additions & 0 deletions docs/developers.md
@@ -0,0 +1,46 @@
# Development

## Dependencies

You need the Python bindings for `notmuch`. In Debian/Ubuntu, this is provided by the `python3-notmuch` package.

## Fork the two repositories

Fork the `netviel` backend and frontend:

* https://github.com/DavidMStraub/netviel
* https://github.com/DavidMStraub/netviel-frontend

And clone them to your computer.

## Prepare the backend

Build it like so:

`cd netviel && python3 -m pip install -e . --user`

## Prepare the frontend

Install NVM:

`wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash`

(you can replace `bash` with your shell of choice.)

Then use NVM to install the latest NPM, and use it in the frontend directory you have cloned:

`nvm install --latest-npm`

`cd netviel-frontend && npm install`

## Run a test server

Run the backend first:

`cd netviel && export FLASK_DEBUG=1 && python3 -m netviel`

(this avoids the need for admin rights). In a separate terminal, run the frontend:

`cd netviel-frontend && npm run start`

This will open a browser and fetch data from the local backend. Note that both run on `localhost` but the backend runs on port 5000 and the frontend on 8001.

0 comments on commit 91a76bf

Please sign in to comment.