Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# shellcheck shell=bash
if ! has nix_direnv_version || ! nix_direnv_version 3.1.2; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.1.2/direnvrc" "sha256-Di03ad3a0ueGi6CGrfhrQzyGdQIg9APXIPCAMNQgWYM="
fi
use flake .

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,5 @@ src/**/*.js
src/**/*.d.ts

.tmp-e2e-*/

.direnv
14 changes: 14 additions & 0 deletions docs/docs/configuration/1-configuration-file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ different file, and most fields can be overridden per run with command flags.
| `initFunctions` | `boolean` | `true` | <Tooltip tip="Lifecycle hooks such as beforeInit, afterInit, beforeRun, etc.">Whether init function lifecycle hooks are wired up.</Tooltip> |
| `client` | `object` | — | Client configuration. See below. |
| `server` | `object` | — | Server configuration. See below. |
| `ssl` | `object` | — | Ssl configuration for the game. See below. |

## `client`

Expand Down Expand Up @@ -50,6 +51,14 @@ The `server` block mirrors `client`, minus `port`. It is disabled by default.
| `dirs.components` | `string` | `server/components` | Where server components live. |
| `dirs.systems` | `string` | `server/systems` | Where server systems live. |

## `ssl`

| Field | Type | Default | Description |
| -------- | -------- | ------- | --------------------------- |
| `enable` | `boolean | `false` | Whether the ssl is enabled. |
| `cert` | `string` | - | Certificate file. |
| `key` | `string` | - | Key file. |

## Example

```json
Expand Down Expand Up @@ -77,6 +86,11 @@ The `server` block mirrors `client`, minus `port`. It is disabled by default.
"save": ".nanoforge/server.save.json"
},
"dirs": { "components": "server/components", "systems": "server/systems" }
},
"ssl": {
"enable": true,
"cert": "path/to/cert",
"key": "path/to/key"
}
}
```
64 changes: 64 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
description = "API";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.systems.url = "github:nix-systems/default";
inputs.flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};

outputs =
{ nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nodejs_24
pnpm
bun
];
};
}
);
}
1 change: 1 addition & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading