aws / aws/graph-explorer

Replace server startup with new config system

Open
#1,662 0 comments 0 reactions 0 assignees View on GitHub
enhancement fundamental infrastructure
Dominant language
TypeScript
Stars
481
Forks
108
Avg merge
6d 8h
Merged PRs (30d)
5

Description

## Parent PRD

#1660

## What to build

Rewire `node-server.ts` to use the new config file loader from #1661 instead of `dotenv` and the old `EnvironmentValuesSchema`. TLS uses user-provided cert/key files only (no auto-generation). The server listens on `GE_PORT` (default 80), logs with pino using `GE_LOG_FORMAT` (`pretty` or `json`), and defaults to HTTP.

Delete the old `env.ts`, `server-config.ts` resolution logic, and `setup-ssl.sh`. The server should create an HTTP or HTTPS server based on `GE_TLS` with provided cert paths.

## Acceptance criteria

- [ ] `node-server.ts` uses the new config loader, no `dotenv` dependency
- [ ] Server starts on `GE_PORT` (default 80) over HTTP by default
- [ ] `GE_TLS=true` with `GE_TLS_CERT`/`GE_TLS_KEY` starts HTTPS server
- [ ] `GE_TLS=true` without cert/key files logs error and exits
- [ ] `GE_LOG_FORMAT=json` produces structured JSON logs, `pretty` produces human-readable logs
- [ ] Old `env.ts` and `server-config.ts` deleted or replaced
- [ ] `setup-ssl.sh` deleted
- [ ] Unit tests for TLS validation and server config resolution

## Blocked by

- Blocked by #1661

## User stories addressed

- User story 5
- User story 14

## Related Issues

- Part of #1660

Contributor guide

Open the contributing guide

Research direction

Start with the new config file loader in #1661, then read node-server.ts and the existing env.ts and server-config.ts resolution logic. Check how setup-ssl.sh is used before removing it. Done means the server follows the listed GE_PORT, GE_TLS, certificate, and GE_LOG_FORMAT behaviors, with unit tests covering TLS validation and config resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
backend, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.