Skip to content

Commit 935b97e

Browse files
committed
refactor: merged /item code
1 parent a9ff07b commit 935b97e

File tree

3 files changed

+6
-42
lines changed

3 files changed

+6
-42
lines changed

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"build": "tsc",
8-
"dev-item-reload": "ts-node-dev --respawn src/index-fn-item-reload.ts",
9-
"dev-item-unload": "ts-node-dev --respawn src/index-fn-item-unload.ts",
10-
"start-item-reload": "node dist/index-fn-item-reload.js",
11-
"start-item-unload": "node dist/index-fn-item-unload.js",
8+
"dev-item": "ts-node-dev --respawn src/index-fn-item.ts",
9+
"start-item": "node dist/index-fn-item.js",
1210
"start": "while true; do sleep 30; done;"
1311
},
1412
"keywords": [],

src/index-fn-item-unload.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import express, { Request, Response, NextFunction } from 'express';
22

33
import { connectMongo } from './mongo/mongoClient';
44
import reloadRoute from './routes/reload';
5+
import unloadRoute from './routes/unload';
56
import healthRoute from './routes/health';
67
import logger from './logger';
78

@@ -11,8 +12,9 @@ const app = express();
1112
const PORT = 3000;
1213

1314
app.use(express.json());
14-
app.use('/', healthRoute); // Route /health
15-
app.use('/item', reloadRoute); // Route /item/:uuid/reload
15+
app.use('/', healthRoute); // Route /health
16+
app.use('/', reloadRoute); // Route /:uuid/reload
17+
app.use('/', unloadRoute); // Route /:uuid/unload
1618

1719
connectMongo()
1820
.then(() => {

0 commit comments

Comments
 (0)