Make the inventory backend standalone runnable

And also make a proposed split of how the loggers are handled.

Now logs look like

```
{
  "type": "incomingRequest",
  "service": "backstage",
  "timestamp": "2020-04-30T14:29:04.002Z",
  "message": "...",
  "level": "info"
}
```

for requests, and then if the plugin logs something properly

```
{
  "type": "plugin",
  "service": "backstage",
  "plugin": "inventory",
  "timestamp": "2020-04-30T14:29:04.002Z",
  "message": "...",
  "level": "info"
}
```
This commit is contained in:
Fredrik Adelöw
2020-04-30 14:36:25 +02:00
parent cd156a44c1
commit 92feb76252
15 changed files with 328 additions and 36 deletions
+1 -1
View File
@@ -24,8 +24,8 @@ import {
const app = express();
app.use(requestLoggingHandler());
app.use('/home', myHomeRouter);
app.use(errorHandler());
app.use(notFoundHandler());
app.use(errorHandler());
app.listen(PORT, () => {
getRootLogger().info(`Listening on port ${PORT}`);