This repository contains various experiments by me. Everything is a single big realm app, to be deployed on heroku. It supports multiple domains, every domain to be mapped to same app.
$ sudo mkdir -p /System/Volumes/Data/nix
$ sudo chown -R `whoami` /System/Volumes/Data/nix
$ echo "nix\t/System/Volumes/Data/nix" | sudo tee /etc/synthetic.conf
And reboot.
$ export NIX_IGNORE_SYMLINK_STORE=1
$ curl https://nixos.org/nix/install | sh
You may also have to do the following:
$ nix-store --add-fixed --recursive sha256 /Applications/Xcode.app
Use nix shell in pure mode to work on our code.
$ nix-shell --pure --run zsh
Ensure postgresql-11 is installed and running. Setup tables:
$ recreatedb
You may want to run scripts/80.sh
.
To test: ctest
, or cargo check --all
for quicker type errors.
Run the service using cargo run -- --test
, and visit http://127.0.0.1:3000
Tested using PyCharm PyCharm 2018.3.7 (Professional Edition). Note: later PyCharms 2019.2 etc, there are some issues.
-
Python: On Preferences -> Project: amitu_heroku -> Project Interpreter -> Gear Icon -> Add -> Virtual Environment -> Existing Environment ->
...
-> Add, select/usr/local/opt/pyenv/versions/amitu_heroku/bin/python
. -
Rust: Ensure Rust Plugin, tested:
v0.2.99.2127-183
, is installed. Optionally install Pest Plugin, essential if editing.pest
files. -
Elm: Ensure Elm Plugin, tested: v3.2.1, is installed. In Preferences -> Languages & Frameworks -> Elm, get path from
nix-shell
usingwhich elm
and set it for "Elm Compiler" and similarlywhich elm-format
for "elm-format". Then open any elm file in "frontend", and select corresponding folder'selm.json
file after clicking "Attach elm.json (or elm-package.json)".