Skip to content

Commit 150a4de

Browse files
move api to a subdir to conglomerate repos
1 parent 809a0cc commit 150a4de

File tree

6 files changed

+17
-3
lines changed

6 files changed

+17
-3
lines changed

.github/workflows/Build.yaml renamed to .github/workflows/bsod-api-container.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ jobs:
2929

3030
- name: Build and push
3131
run: |
32-
docker build -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE}}:latest .
32+
docker build -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE}}:latest /api/Dockerfile
3333
docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE}}:latest
File renamed without changes.

api/USAGE.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# BSOD-API
2+
3+
A basic API to injest `.dmp` files and return analyzed text.
4+
5+
## Usage
6+
With a file
7+
```bash
8+
curl.exe -X PUT http://localhost:3000/analyze-dmp -F "dmpFile=@path/to/test.dmp"
9+
```
10+
11+
With a URL
12+
```bash
13+
curl -X PUT http://localhost:3000/analyze-dmp -F "url=http://example.com/file.dmp"
14+
```

api.js renamed to api/api.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ app.put('/analyze-dmp', upload.single('dmpFile'), async (req, res) => {
138138

139139
// GET endpoint to render README.md as HTML
140140
app.get('/', (req, res) => {
141-
const readmePath = path.join(__dirname, 'README.md');
141+
const readmePath = path.join(__dirname, 'USAGE.md');
142142
fs.readFile(readmePath, 'utf8', (err, data) => {
143143
if (err) {
144144
logger.error(`Error reading README file: ${err.message}`);
145145
res.status(500).send(`Error reading README file: ${err.message}`);
146146
return;
147147
}
148-
const htmlContent = marked(data);
148+
const htmlContent = marked(data, { mangle: false, headerIds: false });
149149
res.send(htmlContent);
150150
});
151151
});
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)