Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Essential Randomness committed Jul 9, 2023
1 parent 8564c27 commit 5f4ba54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions db/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DB_INIT_DIR=${1:-docker-entrypoint-initdb.d}
echo "****************"
echo "****************"
echo "Running db init!"
echo "Using base directory: $DB_INIT_DIR"
echo "****************"
echo "****************"

Expand Down
12 changes: 7 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
systems.url = "github:nix-systems/default";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
inputs.flake-utils {
src = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
}
};

outputs = { self, nixpkgs, systems, ... } @ inputs:
Expand All @@ -21,7 +24,6 @@
buildPhase = ''
yarn build
'';
distPhase = "";
installPhase = ''
mkdir -p $out/libexec/bobaserver
mv node_modules $out/libexec/bobaserver/
Expand All @@ -30,9 +32,10 @@
};

bobadatabase = pkgs.writeShellScriptBin "bobadatabase" ''
/bin/sh -c "${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/init.sh ${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/"
${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/init.sh ${bobaserver-assets}/libexec/bobaserver/deps/bobaserver/db/
'';

# TODO: swap with wrapProgram
bobaserver = pkgs.writeShellScriptBin "bobaserver" ''
export NODE_PATH=${bobaserver-assets}/libexec/bobaserver/node_modules
export DEBUG=bobaserver:*,-*info
Expand All @@ -42,6 +45,5 @@
default = bobaserver;
}
);
defaultPackage = forEachSystem (system: self.packages.${system}.default);
};
}
2 changes: 1 addition & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ app.use((req, res, next) => {
initOpenApiDocs(app);
app.use(withLoggedIn);

const port = process.env.BOBASERVER_PORT || 4200;
const port = parseInt(process.env.BOBASERVER_PORT || "4200");

applyRoutes(app);
registerEventHandlers();
Expand Down

0 comments on commit 5f4ba54

Please sign in to comment.