Upgrade deps and add new relic for tracing and logs (#103)

* Upgrade deps and add new relic for tracing and logs

* Added env variable

* Readd bernard which was accidently removed
This commit is contained in:
Niklas Fondberg
2022-02-11 11:50:56 +01:00
committed by GitHub
parent 8deebb3b1e
commit 0685902d9f
6 changed files with 7599 additions and 10915 deletions
+7 -1
View File
@@ -1,3 +1,4 @@
require('newrelic');
import dotenv from 'dotenv';
dotenv.config();
@@ -20,6 +21,7 @@ import { readFileSync } from 'fs';
import { InteriorsLambdaAPI } from './datasources/interiors-lambda-api';
import { TextsAPI } from './datasources/texts-api';
import { PrintProductDefaultsAPI } from './datasources/printproduct-defaults-api';
const newRelicPlugin = require('@newrelic/apollo-server-plugin');
const path = require('path');
const typeDefs = readFileSync(
@@ -94,10 +96,14 @@ async function main() {
dataSources,
context,
introspection: true,
plugins: [newRelicPlugin],
});
await server.listen();
console.log('Server is running on http://localhost:4000');
console.log(
'Server is running on http://localhost:4000, ',
process.env.ENVIRONMENT_NAME,
);
}
main();