remove newrelic from use in devenv

This commit is contained in:
Keksike
2017-07-02 19:35:56 +03:00
parent cdc9b5a141
commit 680715c262
3 changed files with 7 additions and 26 deletions

View File

@@ -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`.

View File

@@ -1,18 +0,0 @@
{
"all": {
"slack": {
"token": "",
"privateChannel": "",
"publicChannel": ""
},
"github": {
"token": ""
},
"twitter": {
"consumerKey": "",
"consumerSecret": "",
"token": "",
"tokenSecret": ""
}
}
}

View File

@@ -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);