Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 committed Sep 12, 2024
1 parent d901341 commit dbccbe9
Show file tree
Hide file tree
Showing 43 changed files with 517 additions and 567 deletions.
1 change: 1 addition & 0 deletions examples/http-server/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 0 additions & 3 deletions examples/http-server/.prettierignore

This file was deleted.

3 changes: 3 additions & 0 deletions examples/http-server/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
122 changes: 0 additions & 122 deletions examples/http-server/eslint.config.mjs

This file was deleted.

90 changes: 0 additions & 90 deletions examples/http-server/flake.lock

This file was deleted.

42 changes: 17 additions & 25 deletions examples/http-server/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
services-flake.url = "github:juspay/services-flake";
};

outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = inputs.nixpkgs.lib.systems.flakeExposed;

imports = [
inputs.process-compose-flake.flakeModule
];

perSystem = {pkgs, ...}: {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
Expand All @@ -27,31 +24,26 @@
inputs.services-flake.processComposeModules.default
];

services = {
tempo.tempo.enable = true;

redis.redis.enable = true;

grafana.grafana = {
enable = true;
http_port = 4000;
extraConf = {
"auth.anonymous" = {
enabled = true;
org_role = "Editor";
};
services.tempo.tempo.enable = true;
services.grafana.grafana = {
enable = true;
http_port = 4000;
extraConf = {
"auth.anonymous" = {
enabled = true;
org_role = "Editor";
};
datasources = with config.services.tempo.tempo; [
{
name = "Tempo";
type = "tempo";
access = "proxy";
url = "http://${httpAddress}:${builtins.toString httpPort}";
}
];
};
datasources = with config.services.tempo.tempo; [
{
name = "Tempo";
type = "tempo";
access = "proxy";
url = "http://${httpAddress}:${builtins.toString httpPort}";
}
];
};

services.redis.redis.enable = true;
settings.processes.tsx = {
command = "pnpm dev";
};
Expand Down
51 changes: 20 additions & 31 deletions examples/http-server/package.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,38 @@
{
"name": "http-server",
"version": "0.0.0",
"version": "1.0.0",
"type": "module",
"description": "",
"scripts": {
"check": "tsc -b tsconfig.json",
"dev": "tsx --env-file=.env --watch src/main.ts",
"test": "vitest"
},
"packageManager": "pnpm@9.9.0",
"dependencies": {
"@effect/experimental": "^0.24.0",
"@effect/opentelemetry": "^0.36.0",
"@effect/platform": "^0.63.0",
"@effect/platform-node": "^0.58.0",
"@effect/schema": "^0.72.0",
"@effect/sql": "^0.10.0",
"@effect/sql-sqlite-node": "^0.10.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.53.0",
"@opentelemetry/sdk-trace-base": "^1.26.0",
"@opentelemetry/sdk-trace-node": "^1.26.0",
"effect": "^3.7.2",
"uuid": "^10.0.0"
},
"keywords": [],
"author": "",
"packageManager": "pnpm@9.7.0",
"devDependencies": {
"@effect/eslint-plugin": "^0.2.0",
"@effect/language-service": "^0.1.0",
"@effect/vitest": "^0.9.2",
"@eslint/compat": "^1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.1",
"@effect/vitest": "^0.9.1",
"@types/node": "^22.5.3",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"eslint": "^9.9.1",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-codegen": "^0.28.0",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sort-destructure-keys": "^2.0.0",
"prettier": "^3.3.3",
"tsup": "^8.2.4",
"tsx": "^4.19.0",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
},
"dependencies": {
"@effect/experimental": "^0.24.1",
"@effect/opentelemetry": "^0.36.1",
"@effect/platform": "^0.63.1",
"@effect/platform-node": "^0.58.1",
"@effect/schema": "^0.72.1",
"@effect/sql": "^0.10.1",
"@effect/sql-sqlite-node": "^0.10.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.53.0",
"@opentelemetry/sdk-trace-base": "^1.26.0",
"@opentelemetry/sdk-trace-node": "^1.26.0",
"effect": "^3.7.1",
"uuid": "^10.0.0"
}
}
Loading

0 comments on commit dbccbe9

Please sign in to comment.