Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
32 changes: 0 additions & 32 deletions .github/workflows/main.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/node_modules
/output
/output-es
/scratch
/.vscode
/.temp

result

Expand All @@ -14,7 +16,7 @@ result
*.sqlite3
*.sqlite3-wal
*.sqlite3-shm
.spec-results

# Keep it secret, keep it safe.
.env
.envrc
25 changes: 16 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,23 @@ There are three more directories containing code for the registry.

Finally, the `flake.nix` file orchestrates builds for the whole repository.

## Running the Registry Server Locally

The registry server requires a `.env` file and an initialized database. To run the server for development:

```sh
# 1. Ensure database is initialized (only needed once)
dbmate up

# 2. Run the server (from the nix shell)
cd app && spago run
```

The server will load environment variables from the `.env` file in the project root and run on port 8080 by default.

## Available Nix Commands

The Registry server can be run locally:
You can also run the packaged registry server:

```sh
nix run .#server
Expand Down Expand Up @@ -78,14 +92,7 @@ nix flake check -L
There is an integration test that will deploy the registry server and make requests to the API, which you can run if you are on a Linux machine. It is included in the `nix flake check` command by default, but it can be convenient to run standalone as well:

```sh
nix build checks.x86_64-linux.integration
```

You can "deploy" the registry server to a local VM and manually hit the API as if it were the production server:

```sh
# The server will be available at localhost:8080
nix run
nix build .#checks.x86_64-linux.integration
```

### Testing Guidelines
Expand Down
150 changes: 0 additions & 150 deletions app/default.nix

This file was deleted.

4 changes: 3 additions & 1 deletion app/spago.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: registry-app
run:
main: Registry.App.Server
main: Registry.App.Main
publish:
license: BSD-3-Clause
version: 0.0.1
Expand Down Expand Up @@ -75,4 +75,6 @@ package:
test:
main: Test.Registry.Main
dependencies:
- registry-test-utils
- spec
- spec-node
Loading