2019-12-06 15:17:48 +01:00
# Secure your application
2019-12-09 10:48:15 +01:00
In this guide we will see how you can secure your Strapi application by using a third party provider.
2019-12-06 15:17:48 +01:00
::: tip
In this example we will use [Sqreen ](https://sqreen.com ).
:::
2020-03-22 13:28:03 -04:00
Their [onboarding ](https://my.sqreen.com/new-application#nodejs-agent ) is really easy to follow and understand.
2019-12-06 15:17:48 +01:00
## Install Sqreen
2020-03-22 13:28:03 -04:00
Sqreen is an Application Security Management tool that enables protection tailored to your stack, allowing unprecedented visibility into your security and ability to scale it in production.
2019-12-06 15:17:48 +01:00
You will have to install Sqreen node_module in your application.
:::: tabs
::: tab yarn
`yarn add sqreen`
:::
::: tab npm
2019-12-09 10:48:15 +01:00
`npm install sqreen`
2019-12-06 15:17:48 +01:00
:::
::::
## Start your application programmaticaly
2019-12-09 10:48:15 +01:00
We will have to require the Sqreen node_module in the file we use to start Strapi.
2019-12-06 15:17:48 +01:00
To do so you will have to create a `server.js` file to be able to start our application by running `node server.js` .
**Path —** `./server.js`
```js
const strapi = require('strapi');
strapi().start();
```
Now you can run `node server.js` and it will start your application.
## Inject and configure Sqreen agent
2019-12-09 10:48:15 +01:00
By following their Node.js onboarding, we need to require the Sqreen node_module where the server is started.
Also, Sqreen has to be required just before Strapi to work!
2019-12-06 15:17:48 +01:00
2020-03-23 14:33:17 +01:00
_This is the reason why we have created a `server.js` file._
2019-12-06 15:17:48 +01:00
To do so, you will have to update this file.
**Path —** `./server.js`
```js
require('sqreen');
const strapi = require('strapi');
strapi().start();
```
To let Strapi and Sqreen sync, you will have to create a `./sqreen.json` file with your credentials.
Then start your server with `node server.js` and we are done.