WIP: stage all uncommitted work — sprints 46-221, graduation headers, specialist fleet, test steps 909-1988
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
9
example_projects/node_api_gateway/PROJECT_META.md
Normal file
9
example_projects/node_api_gateway/PROJECT_META.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# node_api_gateway
|
||||
|
||||
- stack: node
|
||||
- validator: node test/server.test.js
|
||||
- common_failure_modes: route mismatch, status/body drift, invalid json
|
||||
|
||||
## Scope
|
||||
|
||||
Small representative project for training data generation.
|
||||
7
example_projects/node_api_gateway/TASKS.md
Normal file
7
example_projects/node_api_gateway/TASKS.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Task Seeds: node_api_gateway
|
||||
|
||||
src/server.js, test/server.test.js
|
||||
|
||||
## Validator
|
||||
|
||||
`node test/server.test.js`
|
||||
16
example_projects/node_api_gateway/src/server.js
Normal file
16
example_projects/node_api_gateway/src/server.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const http = require("http");
|
||||
|
||||
function health() {
|
||||
return { ok: true, service: "gateway" };
|
||||
}
|
||||
|
||||
const server = http.createServer((_req, res) => {
|
||||
res.writeHead(200, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify(health()));
|
||||
});
|
||||
|
||||
if (require.main === module) {
|
||||
server.listen(8080);
|
||||
}
|
||||
|
||||
module.exports = { health };
|
||||
3
example_projects/node_api_gateway/test/server.test.js
Normal file
3
example_projects/node_api_gateway/test/server.test.js
Normal file
@@ -0,0 +1,3 @@
|
||||
const assert = require("assert");
|
||||
const { health } = require("../src/server");
|
||||
assert.equal(health().ok, true);
|
||||
Reference in New Issue
Block a user