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:
+7
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user