Create new relic default config files for typical 18F projects (django, rails, node) and add to eng-scaffolding (1-2 weeks)
This subcommand will likely need to be added to the docs. So I'm adding the preliminary documentation here - please review if you think anything is missing or confusing!
Docs start here:
The newrelic generator subcommand works to configure your 18F project for newrelic.
Assumptions the newrelic subcommand makes:
You have already initialized the project via some web framework specific initialization script -
Your package dependencies are recorded as follows:
If you are using Django you named your requirements file, requirements.txt.
If you are using Rails you named your Gemfile, Gemfile.
If you are using Node.js you named your packages file, package.json.
Once you've run everything, if you are in django or rails you should be done. However, if you are using Node.js you'll also need to include var newrelic = require('newrelic'); at the top of whatever script is going to start your server. This also means, if you want to test locally you'll need to run npm install newrelic --save.
Note: Right now we cover low security settings, if you are interested in high security, please investigate on your own! And feel free to report back. :)
This pull request is in response to the following request:
https://github.com/orgs/18F/projects/2#card-3371698
What the card says:
Create new relic default config files for typical 18F projects (django, rails, node) and add to eng-scaffolding (1-2 weeks)
This subcommand will likely need to be added to the docs. So I'm adding the preliminary documentation here - please review if you think anything is missing or confusing!
Docs start here:
The newrelic generator subcommand works to configure your 18F project for newrelic.
Assumptions the newrelic subcommand makes:
You have already initialized the project via some web framework specific initialization script -
$ django-admin startproject [mysite]
You have already run
yo 18f:cf-manifest
Your package dependencies are recorded as follows:
requirements.txt
.Gemfile
.package.json
.Once you've run everything, if you are in django or rails you should be done. However, if you are using Node.js you'll also need to include
var newrelic = require('newrelic');
at the top of whatever script is going to start your server. This also means, if you want to test locally you'll need to runnpm install newrelic --save
.Note: Right now we cover low security settings, if you are interested in high security, please investigate on your own! And feel free to report back. :)