Compare commits
3 Commits
5606a59614
...
bee6938a67
| Author | SHA1 | Date | |
|---|---|---|---|
| bee6938a67 | |||
| b0ee53f7d5 | |||
| 5c93c9e982 |
74
TODO.md
74
TODO.md
@@ -1,3 +1,41 @@
|
|||||||
|
## high importance
|
||||||
|
|
||||||
|
- [ ] Add unit tests all over the place.
|
||||||
|
- ⚠️ Huge task - needs breakdown before starting
|
||||||
|
|
||||||
|
- [ ] Add logging service
|
||||||
|
- New golang program, in the same directory as master
|
||||||
|
- Intended to be started by master
|
||||||
|
- Listens to a port specified command line arg
|
||||||
|
- Accepts POSTed (or possibly PUT) json messages, currently in a
|
||||||
|
to-be-defined format. We will work on this format later.
|
||||||
|
- Keeps the most recent N messages in memory. N can be a fairly large
|
||||||
|
number; let's start by assuming 1 million.
|
||||||
|
|
||||||
|
- [ ] Log to logging service from the express backend
|
||||||
|
- Fill out types and functions in `express/logging.ts`
|
||||||
|
|
||||||
|
|
||||||
|
- [ ] Create initial docker-compose.yml file for local development
|
||||||
|
- include most recent stable postgres
|
||||||
|
|
||||||
|
- [ ] Add middleware concept
|
||||||
|
|
||||||
|
- [ ] Add authentication
|
||||||
|
- password
|
||||||
|
- third party?
|
||||||
|
|
||||||
|
- [ ] Add authorization
|
||||||
|
- for specific routes / resources / etc
|
||||||
|
|
||||||
|
- [ ] Add basic text views
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## medium importance
|
||||||
|
|
||||||
|
- [ ] Add email verification
|
||||||
|
|
||||||
- [ ] Update check script:
|
- [ ] Update check script:
|
||||||
- [x] shellcheck on shell scripts
|
- [x] shellcheck on shell scripts
|
||||||
- [x] `go vet` on go files
|
- [x] `go vet` on go files
|
||||||
@@ -5,27 +43,18 @@
|
|||||||
- [x] Run `go fmt` on all .go files
|
- [x] Run `go fmt` on all .go files
|
||||||
- [ ] Eventually, run unit tests
|
- [ ] Eventually, run unit tests
|
||||||
|
|
||||||
- [x] Reimplement fixup.sh
|
- [ ] write docs
|
||||||
- [x] run shfmt on all shell scripts (and the files they `source`)
|
- upgrade docs
|
||||||
- [x] Run `go fmt` on all .go files
|
- starting docs
|
||||||
- [x] Run ~~prettier~~ biome on all .ts files and maybe others
|
- taking over docs
|
||||||
|
|
||||||
|
|
||||||
- [x] Adapt master program so that it reads configuration from command line
|
## low importance
|
||||||
args instead of from environment variables
|
|
||||||
- Should have sane defaults
|
|
||||||
- Adding new arguments should be easy and obvious
|
|
||||||
|
|
||||||
- [x] Add wrapper script to run master program (so that various assumptions related
|
|
||||||
to relative paths are safer)
|
|
||||||
|
|
||||||
- [ ] move `master-bin` into a subdir like `master/cmd` or whatever is
|
- [ ] move `master-bin` into a subdir like `master/cmd` or whatever is
|
||||||
idiomatic for golang programs; adapt `master` wrapper shell script
|
idiomatic for golang programs; adapt `master` wrapper shell script
|
||||||
accordingly
|
accordingly
|
||||||
|
|
||||||
- [ ] Add unit tests all over the place.
|
|
||||||
- ⚠️ Huge task - needs breakdown before starting
|
|
||||||
|
|
||||||
- [ ] flesh out the `sync.sh` script
|
- [ ] flesh out the `sync.sh` script
|
||||||
- [ ] update framework-managed node
|
- [ ] update framework-managed node
|
||||||
- [ ] update framework-managed pnpm
|
- [ ] update framework-managed pnpm
|
||||||
@@ -37,3 +66,20 @@
|
|||||||
- One solution: start and stop workers serially: stop one, restart it with new
|
- One solution: start and stop workers serially: stop one, restart it with new
|
||||||
code; repeat
|
code; repeat
|
||||||
- Slow start them: only start a few at first
|
- Slow start them: only start a few at first
|
||||||
|
|
||||||
|
|
||||||
|
## finished
|
||||||
|
|
||||||
|
- [x] Reimplement fixup.sh
|
||||||
|
- [x] run shfmt on all shell scripts (and the files they `source`)
|
||||||
|
- [x] Run `go fmt` on all .go files
|
||||||
|
- [x] Run ~~prettier~~ biome on all .ts files and maybe others
|
||||||
|
|
||||||
|
- [x] Adapt master program so that it reads configuration from command line
|
||||||
|
args instead of from environment variables
|
||||||
|
- Should have sane defaults
|
||||||
|
- Adding new arguments should be easy and obvious
|
||||||
|
|
||||||
|
- [x] Add wrapper script to run master program (so that various assumptions related
|
||||||
|
to relative paths are safer)
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ const { values } = parseArgs({
|
|||||||
type: "string",
|
type: "string",
|
||||||
short: "l",
|
short: "l",
|
||||||
},
|
},
|
||||||
|
"log-address": {
|
||||||
|
type: "string",
|
||||||
|
default: "8085",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
strict: true,
|
strict: true,
|
||||||
allowPositionals: false,
|
allowPositionals: false,
|
||||||
@@ -16,7 +20,7 @@ function parseListenAddress(listen: string | undefined): {
|
|||||||
port: number;
|
port: number;
|
||||||
} {
|
} {
|
||||||
const defaultHost = "127.0.0.1";
|
const defaultHost = "127.0.0.1";
|
||||||
const defaultPort = 3000;
|
const defaultPort = 3500;
|
||||||
|
|
||||||
if (!listen) {
|
if (!listen) {
|
||||||
return { host: defaultHost, port: defaultPort };
|
return { host: defaultHost, port: defaultPort };
|
||||||
@@ -43,7 +47,9 @@ function parseListenAddress(listen: string | undefined): {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const listenAddress = parseListenAddress(values.listen);
|
const listenAddress = parseListenAddress(values.listen);
|
||||||
|
const logAddress = parseListenAddress(values["log-address"]);
|
||||||
|
|
||||||
export const cli = {
|
export const cli = {
|
||||||
listen: listenAddress,
|
listen: listenAddress,
|
||||||
|
logAddress,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// internal-logging.ts
|
// internal-logging.ts
|
||||||
|
|
||||||
|
import { cli } from "./cli";
|
||||||
|
|
||||||
// FIXME: Move this to somewhere more appropriate
|
// FIXME: Move this to somewhere more appropriate
|
||||||
type AtLeastOne<T> = [T, ...T[]];
|
type AtLeastOne<T> = [T, ...T[]];
|
||||||
|
|
||||||
@@ -32,6 +34,9 @@ type FilterArgument = {
|
|||||||
|
|
||||||
const log = (_message: Message) => {
|
const log = (_message: Message) => {
|
||||||
// WRITEME
|
// WRITEME
|
||||||
|
console.log(
|
||||||
|
`will POST a message to ${cli.logAddress.host}:${cli.logAddress.port}`,
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getLogs = (filter: FilterArgument) => {
|
const getLogs = (filter: FilterArgument) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user