mirror of
https://github.com/koodiklinikka/koodiklinikka.fi-api.git
synced 2026-02-12 08:52:03 +00:00
remove newrelic from use in devenv
This commit is contained in:
@@ -10,10 +10,6 @@ $ cd koodiklinikka.fi-api
|
||||
$ npm install
|
||||
```
|
||||
|
||||
* Create `config.json` file. See [config.template.json](https://github.com/koodiklinikka/koodiklinikka.fi-api/blob/master/config.template.json) for possible options.
|
||||
The config file consists of environment specific blocks. Environment variable `NODE_ENV` determines which block is used. If the environment variable is not present, the `development` block will be selected.
|
||||
`all` block is always used and the block selected is merged into it so that it overwrites the values defined in it.
|
||||
* ``` $ npm start ```
|
||||
|
||||
* ```
|
||||
$ npm start
|
||||
```
|
||||
Now app will be running on `localhost:9000`.
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"all": {
|
||||
"slack": {
|
||||
"token": "",
|
||||
"privateChannel": "",
|
||||
"publicChannel": ""
|
||||
},
|
||||
"github": {
|
||||
"token": ""
|
||||
},
|
||||
"twitter": {
|
||||
"consumerKey": "",
|
||||
"consumerSecret": "",
|
||||
"token": "",
|
||||
"tokenSecret": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
7
index.js
7
index.js
@@ -1,4 +1,3 @@
|
||||
require('newrelic');
|
||||
'use strict';
|
||||
|
||||
var express = require('express');
|
||||
@@ -7,9 +6,13 @@ var cors = require('cors');
|
||||
var bodyParser = require('body-parser');
|
||||
var app = express();
|
||||
|
||||
if(app.get('env') != 'development') {
|
||||
require('newrelic');
|
||||
}
|
||||
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({extended: true}));
|
||||
app.use(cors());
|
||||
app.use(cors({credentials: true, origin: true}));
|
||||
|
||||
morgan.token('body', function(req) {
|
||||
return JSON.stringify(req.body);
|
||||
|
||||
Reference in New Issue
Block a user